StringUtils a helper class with a static methods to handle strings.
public static function compare(s1:String, s2:String):int
Compares two strings . Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
Parameters
Returns
public static function contains(string:String, query:String):Boolean
Searches a query in a string an returns its position.
Parameters
| string:String |
| |
| query:String |
Returns
public static function endsWith(str:String, pattern:String, caseSensitive:Boolean = true):Boolean
Checks whether a string ends with a pattern.
Parameters
| str:String — The string on which to perform the search.
|
| |
| pattern:String — The pattern to search.
|
| |
| caseSensitive:Boolean (default = true) |
Returns
public static function reverse(string:String):String
Reverses a String.
Parameters
| string:String — The string to reverse.
|
Returns
public static function split(toSplit:String, seps:Array):Array
Splits a string using an array of separators.
Parameters
| toSplit:String |
| |
| seps:Array |
Returns
public static function splitIncludingSeps(toSplit:String, seps:Array):Array
Splits a string using an array of separators, and includes the separators inside the returning array.
Parameters
| toSplit:String |
| |
| seps:Array |
Returns
public static function startsWith(str:String, pattern:String, caseSensitive:Boolean = true):Boolean
Checks whether a string begins with a pattern.
Parameters
| str:String — The string on which to perform the search.
|
| |
| pattern:String — The pattern to search.
|
| |
| caseSensitive:Boolean (default = true) |
Returns
public static function stripChar(toStrip:String, char:String):String
Removes a character from a String.
Parameters
| toStrip:String — The string to remove characters from.
|
| |
| char:String — The character to remove.
|
Returns
| String — The string with removed characters.
|
public static function upperCaseFirst(string:String):String
Formats a String occurence with the first character in upper case and the next ones in lower case.
Parameters
Returns
| String — The formatted String.
|
ActionScript Foundry Bundle Project API Documentation - Generated using Adobe ASDoc / Maven Flex Plugin