ESLSTR Functions
Substitute string arguments into a single string.
Substitute1(MAIN_STRING, STR1)
Substitute2(MAIN_STRING, STR1, STR2)
Substitute3(MAIN_STRING, STR1, STR2, STR3)
Substitute4(MAIN_STRING, STR1, STR2, STR3, STR4)
Substitute5(MAIN_STRING, STR1, STR2, STR3, STR4, STR5)
Substitute6(MAIN_STRING, STR1, STR2, STR3, STR4, STR5, STR6)
Substitute7(MAIN_STRING, STR1, STR2, STR3, STR4, STR5, STR6, STR7)
Substitute8(MAIN_STRING, STR1, STR2, STR3, STR4, STR5, STR6, STR7, STR8)
Substitute9(MAIN_STRING, STR1, STR2, STR3, STR4, STR5, STR6, STR7, STR8, STR9)
MAIN_STRING
The string that contains the markers for the substitution strings.
STR1 to STR9
The substitution strings to be used in place of "%1" to "%9", respectively, in MAIN_STRING.
Description
Substitute one or more strings into a single string, in place of the markers "%1" to "%9", and return the resulting string.
The markers may be in any order in MAIN_STRING; they may even be repeated or omitted.
This is very useful when constructing messages to be displayed to the user. This is especially important when the message will be translated to another language, because the order or placement of the substitute strings may need to be changed in the translation.
If a percent sign (%) is required in the result string, use "%%" in MAIN_STRING.
Example
change Primary_GR text to (Substitute2("Accessing %1 by %2", Document_SV, User_SV))
send (Substitute1("Cannot open file \"%1\".\n", Filename_SV)) to errorlog