Package | com.apdevblog.utils |
Class | public class StringUtils |
Inheritance | StringUtils Object |
Language Version : | ActionScript 3.0 |
Runtime Versions : | AIR 1.0, Flash Player 9 |
Property | Defined By | ||
---|---|---|---|
LEFT : Number [static] | StringUtils | ||
RIGHT : Number [static] | StringUtils |
Method | Defined By | ||
---|---|---|---|
hexStringToInt(hex:String):int [static]
converts hexadecimal string to int. | StringUtils | ||
objectToString(obj:Object):String [static]
dumps Object to String. | StringUtils | ||
padString(val:String, strLength:Number, padChar:String, padDirection:Number):String [static]
Resize a given string to a greater length and fill it up with a custom
character. | StringUtils | ||
replace(haystack:String, needle:String, replace:String):String [static]
capitalizes first character of String. | StringUtils | ||
toTitleCase(str:String):String [static]
capitalizes first character of String. | StringUtils | ||
trim(str:String = null):String [static]
removes blanks at the beginning and end of a string. | StringUtils | ||
ucWords(str:String):String [static]
capitalizes first character of every word in String. | StringUtils |
LEFT | property |
public static var LEFT:Number
RIGHT | property |
public static var RIGHT:Number
hexStringToInt | () | method |
public static function hexStringToInt(hex:String):int
converts hexadecimal string to int.
Parameters
hex:String — hexadecimal String (w/ or w/o #)
|
int — corresponding int value
|
objectToString | () | method |
public static function objectToString(obj:Object):String
dumps Object to String.
Parameters
obj:Object — Object to be dumped
|
String |
padString | () | method |
public static function padString(val:String, strLength:Number, padChar:String, padDirection:Number):String
Resize a given string to a greater length and fill it up with a custom character.
Parameters
val:String — The value that will be modified
| |
strLength:Number — The length of the new string
| |
padChar:String — The string will be padded with this character
| |
padDirection:Number (default = NaN ) — Where will the characters be added?
|
String — |
replace | () | method |
public static function replace(haystack:String, needle:String, replace:String):String
capitalizes first character of String.
Parameters
haystack:String — String to search in
| |
needle:String — String that we are looking for
| |
replace:String — If needle is found replace is with this String
|
String |
toTitleCase | () | method |
public static function toTitleCase(str:String):String
capitalizes first character of String.
Parameters
str:String — String to edit
|
String |
trim | () | method |
public static function trim(str:String = null):String
removes blanks at the beginning and end of a string.
Parameters
str:String (default = null ) — String to be trimmed
|
String |
ucWords | () | method |
public static function ucWords(str:String):String
capitalizes first character of every word in String.
Parameters
str:String — String to edit
|
String |