Was this helpful?
_StringSub Function
This procedure substitutes values for parameters that are embedded in a specially formatted string. It also substitutes “\t” with HC_TAB, and “\n” with HC_NEWLINE.
The string must be a varchar string embedded with parameters in the format of “%1”, “%2”, and so forth, up to “%9”, and “\t” and “\n”. Any parameter can occur multiple times in the string.
This function has the following syntax:
varchar(2000) = _StringSub(string=varchar(2000)
[, arg1=varchar(100)][, arg2=varchar(100)][, arg3=varchar(100)]
[, arg4=varchar(100)][, arg5=varchar(100)][, arg6=varchar(100)]
[, arg7=varchar(100)][, arg8=varchar(100)]
[, arg9=varchar(100)])
Arguments
Data Type
Description
string
Varchar(2000)
The string containing the parameters for substitution
arg1 – arg9
Varchar (100)
(Optional) Defines the substitution values for parameters %1 to %9 used in the string
Example—_StringSub function:
str1 = _StringSub(string = 'Employee Name:%1, Address:%2(c/o %1)',
    arg1 = 'John Doe', arg2 ='101 California, USA');
This example returns “Employee Name: John Doe, Address:101 California, USA (c/o John Doe)”.
Last modified date: 12/20/2023