Start » Filter Reference » Basic » String » FormatString

FormatString


Module: FoundationLite

Creates a string according to the given format and data.

Name Type Description
Input value
inFormat String Format string
Input value
inData StringArray Values used in format
Output value
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
\aBell
\bBackspace
\fForm feed
\nNew line
\rCarriage return
\tHorizontal tab
\vVertical tab
\xHHASCII character in hexadecimal notation
\'Single quotation mark
\"Double quotation mark
\?Literal question mark
\0End 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.