Packageorg.apache.flex.utils
Classpublic class StringPadder
InheritanceStringPadder Inheritance Object

Language Version : ActionScript 3.0
Product Versions : Flex 3, FlexJS 0.0
Runtime Versions : Flash Player 9, AIR 1.1

The StringPadder utility class is an all-static class with methods for working with String objects. You do not create instances of StringPadder; instead you call methods such as the StringPadder.pad() method.



Public Methods
 MethodDefined By
  
pad(str:String, padChar:String, size:int, padRight:Boolean = false):String
[static] Pads a string with an arbitrary string.
StringPadder
Method Detail
pad()method
public static function pad(str:String, padChar:String, size:int, padRight:Boolean = false):String

Language Version : ActionScript 3.0
Product Versions : Flex 4.1, FlexJS 0.0
Runtime Versions : Flash Player 10, AIR 1.5

Pads a string with an arbitrary string.

Parameters

str:String — The string to be padded.
 
padChar:String — The character used to pad the string. This should be a single character.
 
size:int — The size of the padded string.
 
padRight:Boolean (default = false) — Which side to add the padding on. By default it's added to the left.

Returns
String — The padded string.