Name
ReplaceList
Synopsis
ReplaceList(string, list1, list2
)
Returns string
with all the elements from
list1
replaced by the corresponding
elements from list2
. ReplaceList( )
performs a case-sensitive search. Here’s an example
that shows how to use this function:
<CFSET MyString="This is my string."> <CFSET List1=" is,my,string"> <CFSET List2=" function,is,cool"> <CFOUTPUT> <B>Original String:</B> #MyString#<BR> <B>List1:</B> #List1#<BR> <B>List2:</B> #List2#<P> <B>ReplaceList(MyString, List1, List2):</B> #ReplaceList(MyString, List1, List2)# </CFOUTPUT>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.