-
-
Save mjclemente/c8aadaceceefd67bcdad68f551c2431b 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