Packageorg.apache.flex.utils
Classpublic class StringTrimmer
InheritanceStringTrimmer Inheritance Object

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

The StringTrimmer class is a collection of static functions that provide utility features for trimming whitespace off Strings.



Public Methods
 MethodDefined By
  
isWhitespace(character:String):Boolean
[static] Returns true if the specified string is a single space, tab, carriage return, newline, or formfeed character.
StringTrimmer
  
splitAndTrim(value:String, delimiter:String):Array
[static] Removes all whitespace characters from the beginning and end of each element in an Array, where the Array is stored as a String.
StringTrimmer
  
trim(str:String):String
[static] Removes all whitespace characters from the beginning and end of the specified string.
StringTrimmer
  
trimArrayElements(value:String, delimiter:String):String
[static] Removes all whitespace characters from the beginning and end of each element in an Array, where the Array is stored as a String.
StringTrimmer
Method Detail
isWhitespace()method
public static function isWhitespace(character:String):Boolean

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Returns true if the specified string is a single space, tab, carriage return, newline, or formfeed character.

Parameters

character:String — The String that is is being queried.

Returns
Booleantrue if the specified string is a single space, tab, carriage return, newline, or formfeed character.
splitAndTrim()method 
public static function splitAndTrim(value:String, delimiter:String):Array

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Removes all whitespace characters from the beginning and end of each element in an Array, where the Array is stored as a String.

Parameters

value:String — The String whose whitespace should be trimmed.
 
delimiter:String — The String that delimits each Array element in the string.

Returns
Array — Array where whitespace was removed from the beginning and end of each element.
trim()method 
public static function trim(str:String):String

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Removes all whitespace characters from the beginning and end of the specified string.

Parameters

str:String — The String whose whitespace should be trimmed.

Returns
String — Updated String where whitespace was removed from the beginning and end.
trimArrayElements()method 
public static function trimArrayElements(value:String, delimiter:String):String

Language Version : ActionScript 3.0
Product Version : FlexJS 0.0
Runtime Versions : Flash Player 10.2, AIR 2.6

Removes all whitespace characters from the beginning and end of each element in an Array, where the Array is stored as a String.

Parameters

value:String — The String whose whitespace should be trimmed.
 
delimiter:String — The String that delimits each Array element in the string.

Returns
String — Updated String where whitespace was removed from the beginning and end of each element.