Discussion Area

ask questions, discuss topics, solve problems

This is a public Discussion Area  publicRSS

Thread

    Delimiter in coldFusion
    Thread posted 07/07/09 by lakshmipriyashankaran
    988 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

    • posted 07/20/09 by krknaveen

      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

      Reply to this Comment

    • posted 07/20/09 by krknaveen

      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...

      Reply to this Comment

    Copyright © 2009 Adobe Systems Incorporated. All rights reserved.

    Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-08-2008).

    Powered by HiveLive