Back to Adaptive Vision Library Lite website
You are here: Start » All Functions » String » FormatString
FormatString
This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.
| Header: | STD.h |
|---|---|
| Namespace: | avl |
Creates a string according to the given format and data.
Syntax
void avl::FormatString ( const atl::String& inFormat, const atl::Array<atl::String>& inData, atl::String& outFormattedString )
Parameters
| Name | Type | Default | Description | |
|---|---|---|---|---|
![]() |
inFormat | const String& | Format string | |
![]() |
inData | const Array<String>& | 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 |


