Discussion Area

ask questions, discuss topics, solve problems

This is a public Discussion Area  publicRSS

Thread

    • Delimiter in coldFusion
      Thread posted Jul 07 by lakshmipriyashankaran
      396 Views, 2 Comments
      Title:
      Delimiter in coldFusion
      Content:

      If i specify a delimiter as '@!' in a list loop what happens is that CF treats all the above as a separate delimiter.Instead I want the entire string to be considered as a single delimiter.

      Code Snippet:

    Comments

    • What you really have to do is change the string "@!" to be a completely new delimiter:

      <cfset lstList = "1@!test!,2@!test!,3@!test!">

      <cfset lstList = replace( lstList, "@!", "~", "all" )>

      ... then use the new character (~ in my case) as the loop delimiter:

      <cfloop list="#lstList#" index="lstItem" delimiters="~">

      ... this way, you will maintain the ! after the test values.

      Source: Ben Nadel's e-mail

    • Actually all we had to do was think a little different...

      This is the same case for a lot of problems... The Solution would be really simple...