<< Click to Display Table of Contents >> Text Function |
![]() ![]() ![]() |
Function |
Description |
Return type |
Example |
---|---|---|---|
character |
Returns the character specified by the code number |
char |
character(int value) |
code |
Returns the numeric code of the first character in the text string |
int |
code(String str) |
concatenate |
Merge several text items into one text item |
string |
concatenate(Object strObj) |
currency |
Convert numbers to text format and apply to default currency symbols. |
string |
currency(double number, int decimals) |
dollar |
Convert the number to text format and apply the $ symbol. |
string |
dollar(double number, int decimals) |
exact |
Compare two strings |
boolean |
exact(String str1, String str2) |
extractNTH |
Matches the source string to the regular expression and returns the corresponding matched substring |
string |
extractNTH("sou rce", "([a-z]+)\\s+([a-z]+)", 2) |
find |
Finding another text value in a text value (case sensitive) |
int |
find(String find, String src, int start) |
fixed |
Set the number format to text with a fixed number of decimal places |
string |
fixed(double number, int decimals, boolean nocommas) |
left |
Returns the leftmost character in a text value |
string |
left(String src, int length) |
len |
Returns the number of characters in the text string |
int |
len(String text) |
lower |
Convert text to lowercase |
string |
lower(String text) |
match |
Returns true if the source string matches a regular expression |
boolean |
match("sou rce","([a-z]+)\\srce") |
mid |
Returns a specified number of characters from a specified position in a text string |
string |
mid(String src, int start, int length) |
proper |
Capitalize the first letter of each word of the text value |
string |
proper(String text) |
replace |
Replace the characters in the text |
string |
replace(String src, int start, int length, String replaced) |
replaceRegex |
Matches the source string to the regular expression and returns the replaced string |
string |
replaceRegex("sou rce", "\\s", "*") |
rept |
Repeat text for a given number of times |
string |
rept(String src, int times) |
right |
Returns the rightmost character in a text value |
string |
right(String src, int length) |
search |
Finding another text value in a text value (case insensitive) |
int |
search(String find, String src, int start) |
substitute |
Replace old text with new text in a text string |
string |
substitute(String src, String old, String newtxt, int times) |
t |
Convert parameters to text |
string |
t(String value) |
text |
Set the number format and convert it to text |
string |
text(double value, String patten) |
trim |
Delete unused spaces in text |
string |
trim(String str) |
upper |
Convert text to uppercase |
string |
upper(String str) |