Built-In Object Type: simple

Inherits All
(MORE DESCRIPTION TO COME.)
Methods:
NameArgumentsDescription
abs
  Returns the absolute value of the current float or integer value.
acos
  Returns the arc cosine of the current float value in radians, in the range of 0 through pi.
acos_d
  Returns the arc cosine of the current float value in degrees, in the range of 0 through 180.
ascii
  Returns the ASCII value (8-bit) for the first character, or 0 if the string is empty.
asin
  Returns the arc sine of the current float value in radians, in the range of -pi/2 through pi/2.
asin_d
  Returns the arc sine of the current float value in degrees, in the range of -90 through 90.
atan
  Returns the arc tagent of the current float value in radians, in the range of -pi/2 through pi/2.
atan_d
  Returns the arc tangent of the current float value in degrees, in the range of -90 through 90.
base64Decode
  Returns a base-64 decoded byte array of the current string value.
capitalizeAllFirstLetters
capAllFirst
  Returns a string that has the all first letter capitalized.
capitalizeFirstLetter
capFirst
  Returns a string that has the first letter capitalized.
ceil
  Returns the smallest (closest to negative infinity) double value that is not less than the current float value and is equal to a mathematical integer.
char
chr
  Returns a character for the current integer value as its Unicode.
contains
pattern
...
If any pattern is found in the current string value, it returns true . The pattern can be a string or a RegExp.
cos
  Returns the trigonometric cosine of the current float value in radians.
cos_d
  Returns the trigonometric cosine of the current float value in degrees.
count
pattern
Returns the number of occurrances of the pattern in the current string value.
csv
separator
trim
minLen
defaultString
Returns an array of sub-strings, separated by separator, of the current string. If no parameter specified, the separator is defaulted to be comma ",". Parameter minLen, if specified, dictates the minimum length of the returned array. If the string does not contain enough elements, defaultString or null is used to fill in. If trim, each substring's whitespaces are trimed; by default, trim is false .
date
  Returns the date/time value; if this is a date object, returns that; otherwise, the integer value is used to create a date. See parseDate() for parsing the string value to a date object.
decodeUrl
  Returns a string that is URL-decoded of the current string value.
degree
  Returns the degrees of the current radian value.
encodeUrl
  Returns a string that is URL-encoded of the current string value.
endsWith
str
...
Returns true if the current string ends with any one of the parameters.
equalsIgnoreCase
str
Returns true if the current string is case-insenstively the same as the parameter.
escapeHtml
  Escapes this string value for HTML; uses the rules set in org.apache.commons.lang.StringEscapeUtils.
escapeJava
onlyNonASCII
Escapes this string value for Java source code; uses the rules set in org.apache.commons.lang.StringEscapeUtils. If onlyNonASCII is true , only non-ASCII characters are escaped; all the whitespace characters are preserved. By default this flag is false .
escapeJavaScript
  Escapes this string value for JavaScript; uses the rules set in org.apache.commons.lang.StringEscapeUtils.
escapeSql
  Escapes this string value for SQL; uses the rules set in org.apache.commons.lang.StringEscapeUtils.
escapeXml
  Escapes this string value for XML; uses the rules set in org.apache.commons.lang.StringEscapeUtils.
exp
  Returns the exponential number e (i.e., 2.718...) raised to the power of the current float value.
fileExists
existsFile
  Returns true if the file represented by the current string value exists in the file system.
fileSize
fileLength
  Returns the size for the file represented by the current string value.
fileTime
  Returns the last modified time for the file represented by the current string value.
fileWritable
fileCanWrite
  Returns true if the file represented by the current string value is writable.
float
double
  Returns the floating-point number value for this object. It may throw exception if no integer value is available, such as a string with invalid integer format.
floor
  Returns the largest (closest to positive infinity) double value that is not greater than the current float value and is equal to a mathematical integer.
formatBool
fmtBool
falseName
trueName
Returns the string representation of the current boolean number, which is an integer that 0 means false and non-0 true . If both parameters are specified, use them. Otherwise, it is "false" or "true".
formatCurrency
fmtCurrency
language
country
Returns the string representation of currency the currentn integer number. If language and/or country are provided, it uses that locale; otherwise, use the default locale.
formatDuration
fmtDuration
  Returns an English phrase for the currentn integer number as duration in seconds.
formatHex
fmtHex
format
Returns the hexadecimal representation of the current integer number. The format is a number followed by 'A' or 'a', where number is the width (0 left-packed), and 'A' or 'a' indicate the case for A through F.
formatOctal
fmtOctal
  Returns the octal representation of the current integer number.
formatRoman
fmtRoman
upperCase
Returns the Roman representation of the current integer number, in upper case if upperCase is true or lower case otherwise. Default is lower case.
fractionDigits
digits
Returns a double number that rounds to so many digits after decimal point.
getAt
index
Returns the character (length-1 string) at index of the current string.
getBytes
encoding
Returns a byte array of the current string value for the encoding. If no parameters specified, use the JVM's default character encoding.
getChars
  Returns the character array of the current string value.
getFileExt
getFileExtension
  Returns the file extension of the path as represented by the current string value.
getFileName
  Returns the file name in the path as represented by the current string value.
getFilePath
  Returns the path (excluding the file name) as represented by the current string value.
getReader
  For the current string, returns a reader object to read the content of the string.
groupNumber
distance
divider
Returns a string representation for the current integer value that divides distance consecutive characters with divider if specified (default is ',').
indexOf
str
startIndex
Returns the index of the str in the current string value. The search starts from startIndex, if specified. If the substring is not found, returns -1.
int
  Returns the integer value for this object. It may throw exception if no integer value is available, such as a string with invalid integer format.
isAlnum
  Checks the first character and returns true if it is a letter or a digit.
isAlpha
  Checks the first character and returns true if it is a letter.
isAsciiOnly
  Returnes true if all the characters in this string are ASCII.
isDigit
  Checks the first character and returns true if it is a digit.
isDir
isDirectory
  Returns true if the current string value represents a valid directory in the file system.
isEmpty
  Returns true if this is null or this object is a string with only whitespaces.
isEven
  Returns true if the current integer value is even.
isFile
  Returns true if the current string value represents a valid file in the file system.
isFileHidden
  Returns true if the current string value represents a valid hidden file in the file system.
isLower
  Checks the first character and returns true if it is a lower-case character.
isNotEmpty
  Returns true if this is not null and trim() returns non-0.
isOdd
  Returns true if the current integer value is odd.
isUpper
  Checks the first character and returns true if it is a upper-case character.
isWhitespace
isWhite
  Checks the first character and returns true if it is a white-space character.
lastIndexOf
str
startIndex
Returns the index of the str in the current string value, starting from the back. The search starts from startIndex, if specified. If the substring is not found, returns -1.
left
index
Returns the sub-string starting from 0 up to index exclusive. If index <= 0, returns the original string.
leftOf
subString
Returns the sub-string starting from 0 up to subString.
length
size
  Returns the length of the current string value.
log
  Returns the natural logorithm (base e) of the current float value.
log10
  Returns the base 10 logorithm of the current float value.
log2
  Returns the base 2 logorithm of the current float value.
matches
regex
Returns true if the regex regular expression matches this string value.
neverEmpty
defaultValue
If the current string value is not empty, returns itself. Otherwise, returns the defaultValue if specified, or a space otherwise.
numOfDigits
  Returns the number of digits for the decimal format of this integer value.
numOfHexDigits
  Returns the number of digits for the hexadecimal format of this integer value.
numOfOctalDigits
  Returns the number of digits for the octal format of this integer value.
parseDate
format
Returns a date value of the current string value based on format. If no parameters specified, use the default date format at the time.
parseFixedPosition
len
...
Returns a string array of substring with the specified lengths, that is, each substring is at the fixed position in this variable as a string.
parseInt
  Returns an integer of the current string value either in the decimal, octal or hexadecimal format.
parseIntRoman
  Returns an integer of the current string value as Roman format.
parseUrl
  Parses the current string value as a URL and returns a struct that possibly holds these values:
FieldMeaning
urlthe original value.
protocolthe protocol (before "://")
domainthe domain of this URL.
hostthe host part of the domain.
portthe port part of the domain.
rootfrom the beginning up to the host part of the URL.
paththe virtual path part of the URL.
file_namethe file name of the URL.
query_stringthe query string of the URL following "?" before "#".
refthe reference part of the URL following "#".
pow
power
Returns of value of the current float value raised to the power. If no parameters specified, returns 1.
radian
  Returns the radians of the current degree value.
regionMatches
offset
other
other_offset
length
Returns true if a regional match is found for other in the current string. The search starts at offset in the current string and other_offset in other for the specified length. If length is not specified, it is the length for the other minus other_offset.
regionMatchesIgnoreCase
offset
other
other_offset
length
Returns true if a case-insensitive regional match is found for other in the current string. The search starts at offset in the current string and other_offset in other> for the specified length. If length is not specified, it is the length for the other minus other_offset.
replace
old
new
Does a non-regular-expression replacing of all the old sub-string to new for the current string value.
replaceAll
regex
newValue
Returns a new string with all the regex regular expression matches replaced by regex. newValue can be null .
replaceFirst
regex
newValue
Returns a new string with the first regex regular expression matches replaced by regex. newValue can be null .
replaceIgnoreCase
  Case-insensitively replaces the old sub-string to new for the current string value,
right
count
Returns the sub-string starting from count characters from the end. If count <= 0, returns the original string.
rightOf
subString
Returns the sub-string starting from subString to the end.
round
  Returns the closest long to the current float value.
sin
  Returns the trigonometric sine of the current float value in radiant.
sin_d
  Returns the trigonometric sine of the current float value in degrees.
split
regex
limit
Returns an array of sub-strings of the current string value splitted by the regex regular expression. The array is no longer than limit if it is specified.
splitWithMatches
regex
Returns an array of sub-strings of the current string value splitted by the regex regular expression, including the matched patterns.
splitWithMatchesOnly
regex
Returns an array of matched patterns of the current string value matched by the regex regular expression.
sqrt
  Returns the square-root of the current float value.
startsWith
str
...
Returns true if the current string starts with any one of the parameters.
stringCompare
other
Compares this string value to other, and returns 1 if this one is "greater", -1 if other is greater, or 0 if they are the same.
substr
substring
start
end
Returns the sub-string starting at start inclusive to end exclusive. If end is not specified, it is up to the end of the current string.
tan
  Returns the trigonometric tagent of the current float value in radiant.
tan_d
  Returns the trigonometric tagent of the current float value in degrees.
toAbsolutePath
  Returns the absolute path for a file represented by this string value.
toBoolean
  Returns a java.lang.Boolean object for the current boolean value.
toByte
  Returns a java.lang.Byte object for the current integer value.
toCharacter
  Returns a java.lang.Character object for the first character of the current string value. If it is empty, a space is returned.
toDouble
  Returns a java.lang.Double object for the current float value.
toFloat
  Returns a java.lang.Float object for the current float value.
toInteger
  Returns a java.lang.Integer object for the current integer value.
toLong
  Returns a java.lang.Long object for the current integer value.
toLower
toLowerCase
  Returns the lower case of the current string value.
toOSPath
  If this is Windows, replace '/' with '\'. Otherwise, return self. This can be useful in exec commands and other Windows-specific usages.
toShort
  Returns a java.lang.Short object for the current integer value.
toString
  Returns a string object for this value. If this is string, the self is returned.
toUpper
toUpperCase
  Returns the upper case of the current string value.
trim
pattern
If pattern is missing, returns a string value that is the current string value with whitespace characters trimmed from both ends. If pattern is specified, trims all its occurrances at the head and tail.
truncate
trunc
numChars
Returns the sub-string that is numChars shorter. If parameter is invalid, returns the original string.
unescapeHtml
  Unescapes this string value for HTML; uses the rules set in org.apache.commons.lang.StringEscapeUtils.
unescapeJava
  Unescapes this string value for Java source code; uses the rules set in org.apache.commons.lang.StringEscapeUtils.
unescapeJavaScript
  Unescapes this string value for JavaScript; uses the rules set in org.apache.commons.lang.StringEscapeUtils.
unescapeXml
  
unicode
  Returns the Unicode value for the first character, or 0 if the string is empty.
unit
singularName
pluralName
Returns an English representation for the number of the entities. If the current value is one, returns "1 " and the singularName; otherwise, returns the number and the plural name, which is pluralName if it is specified, or singularName ended with 's'.
unquote
leftQuote
rightQuote
Returns a substring of the current string value with quotes trimmed off. If no leftQuote and rightQuote specified, the single-quote or double-quote character is assumed. If only leftQuote is specified, and the leftQuote is a single character, then for '(', '<', '{' and '[', the right quote is ')', '>', '}' and ']', respectively; otherwiser, the right quote is the same as leftQuote.
writeToFile
filename
encoding
Writes this value (as string) into the file denoted by filename. If encoding is specified, use it; otherwise, use the JVM's default encoding.