TSTool / Command / FormatStringProperty
FormatStringProperty command uses zero or more processor properties
as input and formats an output processor property.
For example, it may be necessary to concatenate values from several properties
to create a string that can be used in a command.
The command also can be used to assign a literal string to property,
SetProperty is more suitable.
Formatting occurs as follows:
- The data types for input properties control the type of formatting that can be done. For example, properties that are floating-point numbers must use the format specifiers for floating-point numbers.
- Format specifiers are consistent with the C programming language.
- A newline character can be inserted using
\n, although properties with newlines may cause issues if output to a file.
- Null input properties will result in blanks in output.
The following dialog is used to edit the command and illustrates the command syntax.
FormatStringProperty Command Editor (see also the full-size image)
The command syntax is as follows:
||The names of one or more input processor properties. Values corresponding to the properties will be formatted according to the Format parameter. Input properties can be omitted if the format string is a literal value.||Required if format specifiers are given.|
|The format specifier string used to format the property values. See the editor dialog for examples and refer to
||None – must be specified.|
|The name of the processor property to be set.||None – must be specified.|
||Indicate the output property type, which allows the command to create properties other than strings. The formatted string must have an appropriate value to allow the conversion:
See the automated tests.