Created
November 29, 2016 17:01
-
-
Save JamoCA/dc4915d27d55063390557d839c2cfee5 to your computer and use it in GitHub Desktop.
ColdFusion UDF to trim, strip multiple spaces and remove undesireable space characters (non-breaking space, tab, line feed, carriage return)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function singleLine(s){ | |
s = replacelist(s, "#chr(9)#,#chr(10)#,#chr(12)#,#chr(13)#,#chr(160)#", " , , , , "); | |
return trim(reReplace(s, "[[:space:]]{2,}", " ", "all")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment