STD.Str.SubstituteIncluded( source, target, replacement )
STD.Uni.SubstituteIncluded( source, target, replacement )
source | A string containing the data to search. |
target | A string containing the characters to search for. |
replacement | A string containing the replacement character as its first character. |
Return: | SubstituteIncluded returns a STRING or UNICODE value, as appropriate. |
The SubstituteIncluded functions return the source string with the replacement character substituted for all characters that exist in both the source and the target string. If no target string characters are in the source string, it returns the source string unaltered.
Example:
IMPORT STD; A := STD.Uni.SubstituteIncluded(u'abcde', u'cd', u'x'); //A contains u'abxxe'; B := STD.Str.SubstituteIncluded('abcabc','ac','yz'); //B contains 'ybyyby'