/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function removeCarriageReturnsAndNewLines($myString:String):String { var newString:String; var findCarriageReturnRegExp:RegExp = new RegExp("\r", "gi"); newString = $myString.replace(findCarriageReturnRegExp, ""); var findNewLineRegExp:RegExp = new RegExp("\n", "gi"); newString = newString.replace(findNewLineRegExp, ""); return newString; }