private var whitespace:String = " \t\n\r"; /**< Whitespace characters (space, tab, new line and return). */
private function removeWhitespace(source:String):String {
var pattern:RegExp = new RegExp('[' + whitespace + ']', 'g');
return source.replace(pattern, '');
}
AS3: Remove Whitespace
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.