Start » Filter Reference » Basic » String » FormatString
Module: | FoundationLite |
---|
Creates a string according to the given format and data.
Name | Type | Description | |
---|---|---|---|
inFormat | String | Format string | |
inData | StringArray | Values used in format | |
outFormattedString | String | Output formatted string |
Description
The filter creates a string from inFormat pattern.
Using data in the pattern
It is possible to use values from inData array in the pattern. To do it, expression %VAL% must be inserted, where VAL it is an index of a value in an array.
Escape sequences
Table shown below presents list of escape sequences, which can be used in a inFormat string.
Escape sequence | Represents |
---|---|
\a | Bell |
\b | Backspace |
\f | Form feed |
\n | New line |
\r | Carriage return |
\t | Horizontal tab |
\v | Vertical tab |
\xHH | ASCII character in hexadecimal notation |
\' | Single quotation mark |
\" | Double quotation mark |
\? | Literal question mark |
\0 | End of string |
Examples
inFormat = This is the %0% line\n\tand this is the %2% line inData = {"first", "unused", "second"} |
outFormattedString = This is the first line and this is the second line |
Complexity Level
This filter is available on Basic Complexity Level.