ReplaceList()
Replaces occurrences of the elements from a delimited list, in a string with corresponding elements from another delimited list.
The search is case-sensitive.
ReplaceList( string=string, list1=string, list2=string, delimiter_list1=string, delimiter_list2=string, includeEmptyFields=boolean );
Returns: String
Examples
writeDump(ReplaceList('xxxabcdxxxabcd','a,b,c,d','0,1,2,3'));
writeDump(ReplaceList('xxxabcdxxxabcd','a,b,c,d','11'));
writeDump(ReplaceList('xxxabcdxxxabcd','a','1,2,3'));
writeDump(ReplaceList('xxxabcdxxxabcd','',''));
See also
- Lists
- Strings
- ReplaceListNoCase()
- string.replaceList()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)