Using split() and join() you can strip or insert characters into strings very easily.
The below function can be called to do just that.
/// Replaces characters in a string. public static function replaceChars(targetString:String, charactersToStrip:String, replacementCharacters:String = "") { targetString = targetString.split(charactersToStrip).join(replacementCharacters); return targetString; }
Tech Reference: AS3
Leave a Reply