| Package | mx.utils | 
| Class | public class StringUtil | 
| Inheritance | StringUtil  Object | 
StringUtil.substitute() method.  
 
| Method | Defined By | ||
|---|---|---|---|
|  | 
  Indicates whether an object has a specified property defined. | Object | |
|  | 
  Indicates whether an instance of the Object class is in the prototype chain of the object specified 
  as the parameter. | Object | |
| [static] 
      Returns true if the specified string is
      a single space, tab, carriage return, newline, or formfeed character. | StringUtil | ||
|  | 
  Indicates whether the specified property exists and is enumerable. | Object | |
|  | 
     Sets the availability of a dynamic property for loop operations. | Object | |
| [static] 
      Substitutes "{n}" tokens within the specified string
      with the respective arguments passed in. | StringUtil | ||
|  | 
  Returns the string representation of the specified object. | Object | |
| [static] 
      Removes all whitespace characters from the beginning and end
      of the specified string. | StringUtil | ||
| [static] 
      Removes all whitespace characters from the beginning and end
      of each element in an Array, where the Array is stored as a String. | StringUtil | ||
|  | 
  Returns the primitive value of the specified object. | Object | |
| isWhitespace | () | method | 
public static function isWhitespace(character:String):Boolean
      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. | 
| Boolean—trueif the specified string is
      a single space, tab, carriage return, newline, or formfeed character. | 
| substitute | () | method | 
public static function substitute(str:String, ... rest):String
Substitutes "{n}" tokens within the specified string with the respective arguments passed in.
Parameters
| str:String— The string to make substitutions in.
      This string can contain special tokens of the form{n}, wherenis a zero based index,
      that will be replaced with the additional parameters
      found at that index if specified. | |
| ... rest— Additional parameters that can be substituted
      in thestrparameter at each{n}location, wherenis an integer (zero based)
      index value into the array of values specified.
      If the first parameter is an array this array will be used as
      a parameter list.
      This allows reuse of this routine in other methods that want to
      use the ... rest signature.
      For example
         public function myTracer(str:String, ... rest):void
         { 
             label.text += StringUtil.substitute(str, rest) + "\n";
         }  | 
| String— New string with all of the{n}tokens
      replaced with the respective arguments specified. | 
| trim | () | method | 
public static function trim(str:String):String
Removes all whitespace characters from the beginning and end of the specified string.
Parameters
| str:String— The String whose whitespace should be trimmed. | 
| String— Updated String where whitespace was removed from the 
      beginning and end. | 
| trimArrayElements | () | method | 
public static function trimArrayElements(value:String, delimiter:String):String
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. | 
| String— Updated String where whitespace was removed from the 
      beginning and end of each element. |