Formatter.util Class
Utility functions.
Item Index
Methods
concat
-
arg -
[n
Concatenates the given argument n-1 times with itself and returns the resulting string.
Parameters:
-
argString -
[nNumber= 1]
Returns:
isArray
-
arg
Returns true if the given arg is an Array, false otherwise.
Parameters:
-
argAny
Returns:
isString
-
arg
Returns true if the given arg is a String, false otherwise.
Parameters:
-
argAny
Returns:
pad
-
str -
[ch -
[len -
[left
Appends or prepends the given character to the given string until the resulting string has the specified length.
Parameters:
-
strStringAppend or prepend to this string
-
[chString= ' '] Character to be appended or prepended
-
[lenNumber= String(str).length] Length of the resulting string
-
[leftBoolean= false] Prepend if true, append otherwise
Returns:
padLeft
-
str -
[ch -
[len
Prepends the given character to the given string until the resulting string has the specified length.
Parameters:
-
strStringPrepend to this string
-
[chString= ' '] Character to be prepended
-
[lenNumber= String(str).length] Length of the resulting string
Returns:
padRight
-
str -
[ch -
[len
Appends the given character to the given string until the resulting string has the specified length.
Parameters:
-
strStringAppend to this string
-
[chString= ' '] Character to be appended
-
[lenNumber= String(str).length] Length of the resulting string
Returns:
toArray
-
arg
Returns the argument, a character array or an array of length 1 containing the argument depending whether the argument is an array, a string or any other value.
Parameters:
-
argAny
