Skip to content

Instantly share code, notes, and snippets.

@adamcameron
Created October 29, 2013 12:18
Show Gist options
  • Save adamcameron/7213630 to your computer and use it in GitHub Desktop.
Save adamcameron/7213630 to your computer and use it in GitHub Desktop.
Demonstrates trim trims CF/LR chars
<cfscript>
CR = chr(13);
LF = chr(10);
CRLF = CR&LF;
for (LB in [CR,LF,CRLF,LF & CR & LF]){
original = "#LB#front text#LB#back text#LB#";
trimmed = trim(original);
writeDump(var=[urlEncodedFormat(original), urlEncodedFormat(trimmed)]);
}
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment