resolve-var-syntax( a[, b] )
Group |
Replace all variable placeholders like @MY_VAR@ in string a by the actual value of the addressed variable(s). Only placeholders with variables defined in this profile are replaced, all others will remain in the form @MY_VAR@. If parameter b is set to true, placeholders like <yyyy> or <HH> are replaced as well. Parameter a may contain more than one variable placeholder, e.g. Welcome to @MY_VAR_CITY@ Mr @MY_VAR_NAME@.
Description of Parameters
Parameter |
Description |
a |
String containing the variable placeholders(s). |
b |
(optional) true to resolve date and time placeholders as well. |
Examples
Parameter a |
Parameter b |
Result |
Comment |
Hello world! |
anything |
Hello world! |
No replacement needed. |
Hello @VAR_SAMPLE@! |
anything |
Hello world! |
If VAR_SAMPLE is defined and has the value world. |
@VAR_GREETINGS@ @VAR_SAMPLE@! |
anything |
Hi all! |
If VAR_GREETINGS is defined and has the value Hi and VAR_SAMPLE has the value all. |
@VAR_GREETINGS@ @VAR_SAMPLE@! |
anything |
Hi @VAR_SAMPLE@! |
If VAR_GREETINGS is defined and has the value Hi but variable VAR_SAMPLE is not defined. |
Current time is: <HH>:<mm> |
true |
Current time is: 14:12 |
If the current time is 14:12. |
Current time is: <HH>:<mm> |
not true |
Current time is: <HH>:<mm> |
No support of date and time placeholders. |