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.
Average Rating: (1 rating)
|
Sign in to rate this
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
Attach File...
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...
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
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
Reply to this Comment
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