Packagestencyl.api.engine.utils
Classpublic class StringUtil
InheritanceStringUtil Inheritance Object

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Class that contains static utility methods for manipulating Strings.



Public Methods
 MethodDefined By
  
beginsWith(input:String, prefix:String):Boolean
[static] Determines whether the specified string begins with the spcified prefix.
StringUtil
  
endsWith(input:String, suffix:String):Boolean
[static] Determines whether the specified string ends with the spcified suffix.
StringUtil
  
ltrim(input:String):String
[static] Removes whitespace from the front of the specified string.
StringUtil
  
remove(input:String, remove:String):String
[static] Removes all instances of the remove string in the input string.
StringUtil
  
replace(input:String, replace:String, replaceWith:String):String
[static] Replaces all instances of the replace string in the input string with the replaceWith string.
StringUtil
  
rtrim(input:String):String
[static] Removes whitespace from the end of the specified string.
StringUtil
  
stringHasValue(s:String):Boolean
[static] Specifies whether the specified string is either non-null, or contains characters (i.e.
StringUtil
  
stringsAreEqual(s1:String, s2:String, caseSensitive:Boolean):Boolean
[static] Does a case insensitive compare or two strings and returns true if they are equal.
StringUtil
  
trim(input:String):String
[static] Removes whitespace from the front and the end of the specified string.
StringUtil
Method Detail
beginsWith()method
public static function beginsWith(input:String, prefix:String):Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Determines whether the specified string begins with the spcified prefix.

Parameters

input:String — The string that the prefix will be checked against.
 
prefix:String — The prefix that will be tested against the string.

Returns
Boolean
endsWith()method 
public static function endsWith(input:String, suffix:String):Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Determines whether the specified string ends with the spcified suffix.

Parameters

input:String — The string that the suffic will be checked against.
 
suffix:String — The suffic that will be tested against the string.

Returns
Boolean
ltrim()method 
public static function ltrim(input:String):String

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Removes whitespace from the front of the specified string.

Parameters

input:String — The String whose beginning whitespace will will be removed.

Returns
String
remove()method 
public static function remove(input:String, remove:String):String

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Removes all instances of the remove string in the input string.

Parameters

input:String — The string that will be checked for instances of remove string
 
remove:String — The string that will be removed from the input string.

Returns
String
replace()method 
public static function replace(input:String, replace:String, replaceWith:String):String

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Replaces all instances of the replace string in the input string with the replaceWith string.

Parameters

input:String — The string that instances of replace string will be replaces with removeWith string.
 
replace:String — The string that will be replaced by instances of the replaceWith string.
 
replaceWith:String — The string that will replace instances of replace string.

Returns
String
rtrim()method 
public static function rtrim(input:String):String

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Removes whitespace from the end of the specified string.

Parameters

input:String — The String whose ending whitespace will will be removed.

Returns
String
stringHasValue()method 
public static function stringHasValue(s:String):Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Specifies whether the specified string is either non-null, or contains characters (i.e. length is greater that 0)

Parameters

s:String — The string which is being checked for a value

Returns
Boolean
stringsAreEqual()method 
public static function stringsAreEqual(s1:String, s2:String, caseSensitive:Boolean):Boolean

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Does a case insensitive compare or two strings and returns true if they are equal.

Parameters

s1:String — The first string to compare.
 
s2:String — The second string to compare.
 
caseSensitive:Boolean

Returns
Boolean
trim()method 
public static function trim(input:String):String

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 9.0

Removes whitespace from the front and the end of the specified string.

Parameters

input:String — The String whose beginning and ending whitespace will will be removed.

Returns
String