How can one remove whitespace from a string in as3?
I would like to be able to remove all carriage returns, spaces, tabs etc.
You can use RegExp.
var rex:RegExp = /[\s\r\n]+/gim; var str:String = "This is a string."; str = str.replace(rex,''); // str is now "Thisisastring."
For trimming front and back of strings, use
var rex:RegExp /^\s*|\s*$/gim;