/ Published in: ActionScript 3

If you load text in from an XML file that is wrapped in CDATA tags using 'XML.ignoreWhitespace = true' does not work. This function removes the tabs and linebreaks. To have linebreaks use '' tags.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private function removeTabsAndNewLines($str:String):String { var rex:RegExp = /(\t|\n|\r)/gi; $str = $str.replace(rex,''); return $str; }
Comments
