| Contents > CFML Reference > ColdFusion Functions > 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)
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>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > StripCR |
|
|
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa88.htm