> I have a set of strings that contain carriage returns.  I'd
> like to go through and strip them out.  I figure the REPLACE
> function would do the job but I'm not sure how to refer to
> the carriage returns.
>
> INPUT STRING:
>
> "I am a string with a
> carriage return"
>
> OUTPUT STRING:
>
> "I am a string with a carriage return"
>
> Any hints out there?

You can use the regular Replace, ReplaceList, or ReplaceNoCase functions.
Carriage returns consist of ASCII characters 13 and/or 10, depending on the
operating system on which the original content was created. You can
reference ASCII characters using the Chr() function:

<cfset output = Replace(input, Chr(13), "", "ALL")>
<cfset output = Replace(output, Chr(10), "", "ALL")>

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to