Text Functions

Name

Catergory

Arguments

Result

Description

Examples

Chr

Text Functions

NUMBER

ascii_code

TEXT

Returns a one-character text value containing the character specified by ascii.

Chr(65) will return “A”

ConCats

Text Functions

TEXT

Returns the merged text value of all the arguments.

ConCat(“abc”,”def”,”ghi”) returns “abcdefghi”

LTrim

Text Functions

TEXT text, [TEXT character_mask]

TEXT

Strip whitespace (or other characters) from the beginning of a text value.

LTrim(” abc “) will return “abc “ LTrim(“–abc—“, “-“) will return “abc—“

Num

Text Functions

TEXT text

NUMBER

Converts a text value to number if the text value contains only numeric characters and a decimal point.

Num(“8950”) will return 8950 in numeric form

RTrim

Text Functions

TEXT text, [TEXT character_mask]

TEXT

Strip whitespace (or other characters) from the end of a text value.

RTrim(” abc “) will return ” abc” RTrim(“–abc—“, “-“) will return “–abc”

Str

Text Functions

DATABASE_FIELD/MIXED variable

TEXT

Returns text value of a variable.

Str(“12345”) returns “12345” in text form

StrLen

Text Functions

TEXT_FIELD/TEXT text

NUMBER

Returns the length of the given text value.

StrLen(“Hello World”) returns 11

SubStr

Text Functions

TEXT_FIELD/TEXT text, NUMBER start, [NUMBER length]

Returns the portion of text value specified by the start and length parameters.

TEXT_FIELD/TEXT text The input text value. Must be one character or longer.

INTEGER start If start is non-negative, the returned text value will start at the start’th position in text value, counting from zero. For instance, in the text value ‘abcdef’, the character at position 0 is ‘a’, the character at position 2 is ‘c’, and so forth.

If start is negative, the returned text value will start at the start’th character from the end of text value.

If text value is less than start characters long, FALSE will be returned.

INTEGER length If length is given and is positive, the text value returned will contain at most length characters beginning from start (depending on the length of text value).

If length is given and is negative, then that many characters will be omitted from the end of text value (after the start position has been calculated when a start is negative). If start denotes the position of this truncation or beyond, FALSE will be returned.

If length is given and is 0, FALSE or NULL, an empty text value will be returned.

If length is omitted, the substring starting from start until the end of the text value will be returned.

Trim

Text Functions

TEXT text, [TEXT character_mask]

TEXT

Strip whitespace (or other characters) from the beginning and end of a text value.

Trim(” abc “) will return “abc” Trim(“—abc–“, “-“) will return “abc”

Last updated