Deletes return characters from a string.
A copy of string, after removing return characters.
Display and formatting 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.

<cfscript>
x = 'Hello' & chr(13) & 'World' & chr(13);
y = StripCR(x);
writeOutput('Original: ' & x & ' Length: #len(x)#<br>' );
writeOutput('Stripped: ' & y & ' Length: #len(y)#' );
</cfscript>
Output
Original: Hello World Length: 12
Stripped: HelloWorld Length: 10
Sign in to your account