The _StringSub Procedure
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”. A parameter can occur multiple times in the string.
The syntax for the _StringSub procedure is:
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));
The following code is an example of this syntax:
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)”.