| Package | starling.utils |
| Class | public class StringUtil |
| Inheritance | StringUtil Object |
| Method | Defined By | ||
|---|---|---|---|
clean(string:String):String [static] Replaces a string's "master string" — the string it was built from —
with a single character to save memory. | StringUtil | ||
format(format:String, ... args):String [static] Formats a String in .Net-style, with curly braces ("{0}"). | StringUtil | ||
parseBoolean(value:String):Boolean [static] Returns true if value equals
true, TRUE, True, or 1. | StringUtil | ||
trim(string:String):String [static] Removes all leading and trailing white-space and control characters from the given
String. | StringUtil | ||
trimEnd(string:String):String [static] Removes all trailing white-space and control characters from the given String. | StringUtil | ||
trimStart(string:String):String [static] Removes all leading white-space and control characters from the given String. | StringUtil | ||
| clean | () | method |
public static function clean(string:String):StringReplaces a string's "master string" — the string it was built from — with a single character to save memory. Find more information about this AS3 oddity here.
Parameters
string:String — The String to clean
|
String — The input string, but with a master string only one character larger than it.
|
| format | () | method |
public static function format(format:String, ... args):StringFormats a String in .Net-style, with curly braces ("{0}"). Does not support any number formatting options yet.
Parameters
format:String | |
... args |
String |
| parseBoolean | () | method |
public static function parseBoolean(value:String):Boolean Returns true if value equals
true, TRUE, True, or 1.
Parameters
value:String |
Boolean |
| trim | () | method |
public static function trim(string:String):StringRemoves all leading and trailing white-space and control characters from the given String.
Beware: this method does not make a proper Unicode white-space check, but simply trims all character codes of '0x20' or below.
Parameters
string:String |
String |
| trimEnd | () | method |
public static function trimEnd(string:String):StringRemoves all trailing white-space and control characters from the given String.
Beware: this method does not make a proper Unicode white-space check, but simply trims all character codes of '0x20' or below.
Parameters
string:String |
String |
| trimStart | () | method |
public static function trimStart(string:String):StringRemoves all leading white-space and control characters from the given String.
Beware: this method does not make a proper Unicode white-space check, but simply trims all character codes of '0x20' or below.
Parameters
string:String |
String |