Actually I like this tip of using listqualify to "fix" a list... there are
times when lists get screwed up - legacy code storing lists in a database
for example... that's an easy fix I think.

-----Original Message-----
From: James Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 31, 2006 1:08 AM
To: CF-Talk
Subject: Re: YesNoFormat() is cool!


Or you could just use ListAppend().

On 8/31/06, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> Here's my little, cool, BIF tip:
>
> If you have a loop to build a string, sometimes you may end up with a
> trailing comma such as:
>
> "Monday,Tuesday,Wednesday,"
>
> There are a few ways around this:
> 1. Use an IF statement to test for the end of the loop and not add the
> last comma.
> 2. Use the REReplace() function to remove a comma that exists at the end
> of the string.
> 3. My favorite: Use ListQualify() with the same delimiter.
> ListQualify() will "fix" your list and remove any trailing delimiters.
> The list above will be: "Monday,Tuesday,Wednesday".
>
> Also, it will fix multiple delimiters such as:
>
> "Monday,,Wednesday,Thursday,"  -->  "Monday,Wednesday,Thursday"

--
CFAJAX docs and other useful articles:
http://www.bifrost.com.au/blog/



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:251591
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to