Specifications
Returns true if the string is empty, that is, has a length
of 0; otherwise returns false.
isEmpty() : Boolean
Returns a substring containing the length leftmost
characters of this string.
left( length : Number ) : String
Returns a substring containing the length rightmost
characters of this string.
right( length : Number ) : String
Returns a copy of this string which is the substring starting
at "start" and is "length" characters long. If the optional
mid( start : Number, length :
Number ) : String
length parameter is not specified, the new string will be
from start until the end of the string.
Returns the first position of pattern after pos. If the
pattern is not found, -1 is returned. If pos is not specified,
position 0 is used.
find( pattern : String or RegExp, pos
: Number ) : Number
Returns the first position of pattern before or at pos,
searching backward. If pattern is not found, -1 is returned.
findRev( pattern : String or RegExp,
pos : Number ) : String
If pos is not specified, the search starts at the end of the
string.
Returns true if the string starts with pattern; otherwise
returns false.
startsWith( pattern : String or
RegExp ) : Boolean
Returns true if the string ends with pattern; otherwise
returns false.
endsWith( pattern : String or RegExp
) : Boolean
This function will return a string that replaces the lowest
numbered occurrence of %1, %2, ..., %9 with value.
arg( value : String or Number,
fieldWidth : Number ) : String
The fieldWidth parameter specifies the minimum amount
of space that value is padded to. A positive fieldWidth will
produce right-aligned text, whereas a negative fieldWidth
will produce left-aligned text.
This function behaves like arg above, but is specialized
for the case where value is an integer.
argInt( value : Number, fieldWidth
: Number, base : Number ) : String
value is expressed in base base, which is 10 by default
and must be between 2 and 36.
This function behaves like arg() above, but is specialized
for the case where value is a decimal value.
argDec( value : Number, fieldWidth
: Number, format : String, precision
: Number): String
Argument value is formatted according to the format
specified, which is 'g' by default and can be any of the
following:
• e - format as [-]9.9e[+|-]999
• E - format as [-]9.9E[+|-]999
385
Enfocus Switch 10