Posts tagged as:

spaces

Removing Spaces from a String in ActionScript 3

January 29, 2009

Here’s a simple, two line function for removing spaces (can be adapted for any other character) from a string in AS3. I used it for removing any spaces typed into a Post Code. public function stripspaces(originalstring:String):String { var original:Array=originalstring.split(” “); return(original.join(“”)); } All we’re doing is splitting the array using the space character and then [...]

Read the full article →