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 | ||
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):String
Replaces 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):String
Formats a String in .Net-style, with curly braces ("{0}"). Does not support any number formatting options yet.
Parameters
format:String | |
... args |
String |
trim | () | method |
public static function trim(string:String):String
Removes 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):String
Removes 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):String
Removes 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 |