Method | Defined by | ||
---|---|---|---|
removeNewLines(src:String):String
[static]
Removes all new lines characters
| StringUtil | ||
replace(src:String, from:String, to:String, caseSensitive:Boolean = false):String
[static]
Replace all matched strings with a specific content.
| StringUtil | ||
replace2(source:String, findingChar:String, replaceChar:String):String
[static]
Old approach using Array's join and split
| StringUtil | ||
toProperCase(s:String):String
[static]
Change the first character of source string to uppercase.
| StringUtil | ||
trim(source:String):String
[static]
Remove leading and trailing spaces
| StringUtil | ||
trimLeft(source:String):String
[static]
Remove leading spaces
| StringUtil | ||
trimNewLine(src:String):String
[static]
Parse a text which has prefix and/or suffix
| StringUtil | ||
trimRight(source:String):String
[static]
Remove trailing spaces
| StringUtil | ||
truncate(source:String, length:uint, suffix:String = "..."):String
[static]
Truncate source string and attach suffix after to form a new string fit in a specific length.
| StringUtil |
removeNewLines | () | method |
public static function removeNewLines(src:String):String
Removes all new lines characters
Parameterssrc:String |
String |
replace | () | method |
public static function replace(src:String, from:String, to:String, caseSensitive:Boolean = false):String
Replace all matched strings with a specific content.
Parameterssrc:String — Original string.
|
|
from:String — Pattern string needs to be replaced.
|
|
to:String — String is used to replace.
|
|
caseSensitive:Boolean (default = false )
|
String |
replace2 | () | method |
public static function replace2(source:String, findingChar:String, replaceChar:String):String
Old approach using Array's join and split
Parameterssource:String |
|
findingChar:String |
|
replaceChar:String |
String |
toProperCase | () | method |
public static function toProperCase(s:String):String
Change the first character of source string to uppercase.
Parameterss:String — Original string.
|
String |
trim | () | method |
public static function trim(source:String):String
Remove leading and trailing spaces
Parameterssource:String — String needs to be removed leading and trailing spaces.
|
String |
trimLeft | () | method |
public static function trimLeft(source:String):String
Remove leading spaces
Parameterssource:String — String needs to be removed leading space.
|
String |
trimNewLine | () | method |
public static function trimNewLine(src:String):String
Parse a text which has prefix and/or suffix
Parameterssrc:String — the input text
|
String — an object whose properties contain 3 parts of the text: mainText, prefix and suffix.If both prefix and suffix are not found, return null. |
trimRight | () | method |
public static function trimRight(source:String):String
Remove trailing spaces
Parameterssource:String — String needs to be removed trailing space.
|
String |
truncate | () | method |
public static function truncate(source:String, length:uint, suffix:String = "..."):String
Truncate source string and attach suffix after to form a new string fit in a specific length.
Parameterssource:String — Original string.
|
|
length:uint — The length storing enough some WORDS of source string and suffix.
|
|
suffix:String (default = "... ") — The suffix added after truncating source string.
|
String |