Nope.  any character can be a delimiter.  you can consider the 'c' in
'abcdef' a delimiter between 'ab', and 'def'.  But yeah, there has to be a
delimiter.
I don't think there's a way to do it other than what you've come up with...
looping over the string and inserting the desired delimiter.

Of course, this is usually where somebody proves me wrong and posts
something really cool :)

On Thu, Mar 19, 2009 at 2:30 PM, Christophe Maso <[email protected]> wrote:

>
> Disclaimer - I haven't had to do any fancy string manipulation in a
> while...
>
> I had thought that ANY string can be treated like a list (for example, such
> that "abcdef" can be treated as a list containing six elements and a
> delimiter of "").  Not so, I recently discovered when I tried to use
> listChangeDelims("abcdef", ",", "").  I wanted to input "abcdef" and get
> "a,b,c,d,e,f" returned, but CF doesn't recognize an empty value as a valid
> delimiter for any of its list functions...and it doesn't accept an empty
> value as the second argument in replace(), either.
>
> So I wrote a function that'll do what I want, taking a string and the
> desired delimiter as arguments, then looping through each character in the
> string and inserting the delimiter after it (except for the last character
> in the string).  But as one might imagine, it's SLOW for very long strings.
>  String and list manipulation is kid stuff, or so I'd thought...surely
> there's a faster, simpler means?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320712
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