[thelist] ColdFusion and ListToArray() - more than one character

Joshua Olson joshua at alphashop.net
Wed Apr 25 17:42:57 CDT 2001


You may use Replace to replace the string "Hello" with something NOT in the
character set already, such as:

<cfset mynewstring = Replace(mystring, "Hello", Chr(13), "ALL")>

Then use

<cfset myarray = ListToArray(mynewstring, Chr(13)>

HTH,
-joshua

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of jon steele
> Subject: [thelist] ColdFusion and ListToArray() - more than one
> character
>
>
> Hi,
>
> I knew how to do this before but I forgot...:) I need to use the
> ListToArray() function but the delimiter being MORE than one character
> (e.g. <cfset arr = ListToArray("1Hello2Hello3Hello4","Hello")> would
> give arr[1]=1, arr[2]=2, arr[4]=3, arr[4]=4.
>
> Thanks,
> Jon.





More information about the thelist mailing list