Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfscript>
- myList="a,b,c,d,e";
- myChangeDelims=ListChangeDelims(myList,"|"); //Replace comma in the list with pipe
- WriteOutput(myChangeDelims & " ");
- myAnotherList="a;b;c;d;e;f";
- myCustomDelims=ListChangeDelims(myAnotherList,"@"); //Replace occurrence of "|" with "@"
- WriteOutput(myCustomDelims);
- for (i in listToArray(myList, ",")) {
- WriteOutput(i);
- }
- for (i in listToArray(myList, ";")) {
- WriteOutput(i);
- }
- </cfscript>
Add Comment
Please, Sign In to add comment