StripCR

Deletes return characters from a string.

A copy of string, after removing return characters.

Display and formatting functions, Other functions, String functions

StripCR(string)

ParagraphFormat

Parameter Description

string

A string or a variable that contains one

Useful for preformatted (between <pre> and </pre> tags) HTML display of data entered in textarea fields.

<h3>StripCR Example</h3>

<p>Function StripCR is useful for preformatted HTML display of data 
(PRE) entered in textarea fields. <cfif isdefined("Form.myTextArea")> <pre> <cfoutput>#StripCR(Form.myTextArea)#</cfoutput> </pre> </cfif> <!--- use #Chr(10)##Chr(13)# to simulate line feed/carriage return combination ---> <form action = "stripcr.cfm"> <textarea name = "MyTextArea" cols = "35" rows = 8> This is sample text and you see how it scrolls <cfoutput>#Chr(10)##Chr(13)#</cfoutput> From one line <cfoutput>#Chr(10)##Chr(13)##Chr(10)##Chr(13)#</cfoutput>
to the next </textarea> <input type = "Submit" name = "Show me the HTML version"> </form>

View comments on LiveDocs