stringUtils.as
The stringUtils.as file is a library that adds a number of useful methods to
the build in ActionScript String object.
You can check whether or not the stringUtils.as file is available / loaded with the following code snippet:
if(String.stringUtilsDefined)
{
//stringUtils.as is included
}
else
{
//stringUtils.as could not be found
}
You can access the version number of the stringUtils.as library being used like so::
var versionNumber = String.stringUtilsVersion;
trace(versionNumber)
String.ltrim() |
Returns a string with the whitespace removed from the beginning of the string. It does not directly modify the string that the method is called on.
|
String.rtrim()
|
Returns a string with the whitespace removed from the end of the string. It does not directly modify the string that the method is called on.
|
String.trim() |
Returns a string with the whitespace removed from the beginning and end of the string. It does not directly modify the string that the method is called on.
|
String.beginsWith(string) |
Returns boolean true if the string that the method is called on begins with the string passed to the method, and false if it does not. The comparison is case sensitive.
|
String.endsWith(string) |
Returns Boolean true if the string that the method is called on ends with the string passed to the method, and false if it does not. The comparison is case sensitive.
|
String.remove(string) |
This method searches through the string that the method is called on and returns a copy of the string with all of the occurrences of the string passed into the method removed. This removal is case sensitive.
|
String.replace(string,
string) |
This method replaces all occurrences of the first string parameter with the the second string parameter, and then returns a copy of the new string. This replace is case sensitive.
|