tchmi_format_string
[ Function ]
function tchmi_format_string(formatString: string, …args: any[]): string;
Formats a string.
Placeholder syntax in format string: '{' to start placeholder, optional parameter index with | as separator, description and '}' to close placeholder.
Parameter
Name | Type | Description |
---|---|---|
formatString | The string to be formatted | |
…args | any[] | Placeholder array |
Return value
Type | Description |
---|---|
Masked string. |
Available from version 1.12 |
Sample - JavaScript
TcHmi.Log.debug(tchmi_format_string('{0} Test {1}', 'TwinCAT', 'HMI')); // 'TwinCAT Test HMI'