Static class wrapping various String utilities.
static public function search(str:String, key:String):Boolean
search for key in string
str | (String) |
key | (String) |
Boolean
static public function searchCaseInsensitive(str:String, key:String):Boolean
search for key in string - case insensitive.
str | (String) |
key | (String) |
Boolean
static public function replace(str:String, oldChar:String, newChar:String):String
replace every instance of a string with something else
str | (String) |
oldChar | (String) |
newChar | (String) |
String
static public function removeSpaces(str:String):String
remove spaces
str | (String) |
String
static public function removeTabs(str:String):String
remove tabs
str | (String) |
String
static public function trim(str:String):String
remove spaces at end and beginning of the string only
str | (String) |
String
static public function xtrim(str:String):String
remove spaces tabs, line feeds, carrige returns from string
str | (String) |
String
static public function trimCamel(str:String):String
trim spaces and camel notate string
str | (String) |
String
static public function commaFormatNumber(inNum:Object):String
format a number with commas - ie. 10000 -> 10,000
inNum | (Object) String or Number |
String
static public function firstToUpper(str:String):String
Capitalize the first character in the string.
str | (String) |
String
static public function htmlEncode(str:String):String
encode html
str | (String) |
String
static public function htmlDecode(t:String):String
decode html
t | (String) |
String
static public function stripZeroOnFloat(n:Number):String
strip the zero off floated numbers
n | (Number) |
String
static public function padZeroOnFloat(n:Number):String
add zero in front of floated number
n | (Number) |
String
static public function floatToString(n:Number):String
Remove scientific notation from very small floats when casting to String.
n | (Number) |
String
Usage: trace( String(0.0000001) ); // returns 1e-7 trace( floatToString(0.0000001) ); // returns .00000001
static public function stripZeroAndRepairFloat(n:Number):String
strip the zero off floated numbers and remove Scientific Notation
n | (Number) |
String
static public function randChar(amount:Number):String
Generate a set of random characters
amount | (Number) |
String
static public function randLowerChar(amount:Number):String
Generate a set of random LowerCase characters
amount | (Number) |
String
static public function randNum(amount:Number):String
Generate a set of random Number characters
amount | (Number) |
String
static public function randSpecialChar(amount:Number):String
Generate a set of random Special and Number characters
amount | (Number) |
String
static public function stripTags(str:String):String
strip html markup tags
str | (String) |
String
static public function detectBr(str:String):Boolean
detect html breaks
str | (String) |
Boolean
static public function toDoubleQuote(str:String):String
convert single quotes to double quotes
str | (String) |
String