Packagecom.ericfeminella.utils
Classpublic class StringUtil

All static utility class which builds on mx.utils.StringUtil to add additional methods for replacing items in a specified String



Public Methods
 MethodDefined by
  
containsAlpha(source:String):Boolean
[static] Determines if the specified String contains alpha charachters
StringUtil
  
containsAlphaNumeric(source:String):Boolean
[static] Determines if the specified String contains alpha and / or numeric charachters
StringUtil
  
containsNumeric(source:String):Boolean
[static] Determines if the specified String contains numeric charachters
StringUtil
  
removeHTML(source:String):String
[static] Removes all xml / html tags and returns the a non-marked up String
StringUtil
  
replace(source:String, search:String, substitution:String):String
[static] Replaces a specific section of a String with a new String Object
StringUtil
  
replaceCharachterInstances(source:String, charachter:String, substitution:String):String
[static] Replaces all instances of particular charachter(s) in a specific String with substitution charachter(s)
StringUtil
  
trimWhiteSpace(source:String):String
[static] Replaces all white space charachters form the specified String Object and returns a new String without white space charachters
StringUtil
Method detail
containsAlpha()method
public static function containsAlpha(source:String):Boolean

Determines if the specified String contains alpha charachters

Parameters
source:String — string to evaluate

Returns
Boolean — true if the string contains alpha charachters, false if not
containsAlphaNumeric()method 
public static function containsAlphaNumeric(source:String):Boolean

Determines if the specified String contains alpha and / or numeric charachters

Parameters
source:String — string to evaluate

Returns
Boolean — true if the string contains alpha/numeric charachters, false if not
containsNumeric()method 
public static function containsNumeric(source:String):Boolean

Determines if the specified String contains numeric charachters

Parameters
source:String — string to evaluate

Returns
Boolean — true if the string contains numeric charachters, false if not
removeHTML()method 
public static function removeHTML(source:String):String

Removes all xml / html tags and returns the a non-marked up String

Parameters
source:String — string to remove html tags from

Returns
String — the resulting non-marked up String
replace()method 
public static function replace(source:String, search:String, substitution:String):String

Replaces a specific section of a String with a new String Object

Parameters
source:String — source String Object to perform the operation on
 
search:String — section of the source String to be replaced
 
substitution:String — String Object whjich will replace the section

Returns
String
replaceCharachterInstances()method 
public static function replaceCharachterInstances(source:String, charachter:String, substitution:String):String

Replaces all instances of particular charachter(s) in a specific String with substitution charachter(s)

Parameters
source:String — source String Object to perform the operation on
 
charachter:String — charachter in which all instances are to be replaced
 
substitution:String — charachter which will replace all instances

Returns
String
trimWhiteSpace()method 
public static function trimWhiteSpace(source:String):String

Replaces all white space charachters form the specified String Object and returns a new String without white space charachters

Parameters
source:String — string to trim whitespace

Returns
String — The resulting trimmed String