# Text Functions

| Name    | Catergory      | Arguments                                             | Result                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Examples                                                                 |
| ------- | -------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| Chr     | Text Functions | <p>NUMBER </p><p>ascii\_code</p>                      | 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] | <p> Returns the portion of text value specified by the start and<br>length parameters.</p><p><strong>TEXT\_FIELD/TEXT text</strong><br>The input text value. Must be<br>one character or longer.</p><p><strong>INTEGER start</strong><br>If start is non-negative, the<br>returned text value will start at the start’th position in text value, counting from<br>zero. For instance, in the text value ‘abcdef’, the character at position 0 is ‘a’, the<br>character at position 2 is ‘c’, and so forth.</p><p>If start is negative, the returned<br>text value will start at the start’th character from the end of text value.</p> | <p>If<br>text value is less than start characters long, FALSE will be returned.</p><p><strong>INTEGER</strong><br><strong>length</strong><br>If length is given and is positive, the text value returned will<br>contain at most length characters beginning from start (depending on the length of text<br>value).</p><p>If length is given and is negative, then that many characters will be<br>omitted from the end of text value (after the start position has been calculated when a<br>start is negative). If start denotes the position of this truncation or beyond, FALSE<br>will be returned.</p><p>If length is given and is 0, FALSE or NULL, an empty text value<br>will be returned.</p><p>If length is omitted, the substring starting from start until<br>the end of the text value will be returned.</p> |                                                                          |
| 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”     |
