/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function stripSpaces($myString:String):String { return $myString.split(" ").join(""); } var originalStr:String = " A B C D E F G "; trace("originalStr: "+originalStr); var withNoSpacesStr:String = stripSpaces(originalStr); trace("withNoSpacesStr: "+withNoSpacesStr); // OUTPUT // originalStr: A B C D E F G // withNoSpacesStr: ABCDEFG