Guest User

Untitled

a guest
Jul 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <cfscript>
  2.  
  3. myList="a,b,c,d,e";
  4. myChangeDelims=ListChangeDelims(myList,"|"); //Replace comma in the list with pipe
  5. WriteOutput(myChangeDelims & " ");
  6. myAnotherList="a;b;c;d;e;f";
  7. myCustomDelims=ListChangeDelims(myAnotherList,"@"); //Replace occurrence of "|" with "@"
  8. WriteOutput(myCustomDelims);
  9.  
  10. for (i in listToArray(myList, ",")) {
  11. WriteOutput(i);
  12. }
  13.  
  14. for (i in listToArray(myList, ";")) {
  15. WriteOutput(i);
  16. }
  17. </cfscript>
Add Comment
Please, Sign In to add comment