Embed strings at specific substitution points (&1 &2 etc)
Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)
Name | Type | Data Type | Description |
---|---|---|---|
Result | *Result (Optional) | String | Resulting string |
String1 | *Input (Optional) | String | String to be embedded |
String2 | *Input (Optional) | String | String to be embedded |
String3 | *Input (Optional) | String | String to be embedded |
String4 | *Input (Optional) | String | String to be embedded |
String5 | *Input (Optional) | String | String to be embedded |
String6 | *Input (Optional) | String | String to be embedded |
String7 | *Input (Optional) | String | String to be embedded |
String8 | *Input (Optional) | String | String to be embedded |
String9 | *Input (Optional) | String | String to be embedded |
Substitute allows you to replace text at a series of predetermined points in a string, identified by &1 to &9. If two ampersands appear together in a string, they are reduced to a single ampersand and not considered for substitution.
In this example, *MtxtCust01 is a multilingual variable containing the following "&1 &2 has a limit of $&3". #Givename, #Surname and #Limit have values of "Veronica", "Brown" and "2000" respectively. The result at run-time would be, "Veronica Brown has a limit of $2000"
#Com_owner.caption := *MtxtCust01.Substitute(#Givename #Surname #Limit.AsString)
In this example, #string will equal "a&2"
#string := ("&1&&2").Substitute( "a " "b " )
Febuary 18 V14SP2