Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu Show menu

String functions

String functions are functions that have a non-numerical result. A string is a sequence of characters not interpreted as a number, e.g. Jones, "25".

ACHAR(x) ANSI character function

ACODE(str) Character to ANSI code conversion

CHAR(x) Unicode character function

CODE(str) Character to Unicode code conversion

CONCAT(s1,s2) joins two or more strings together

FIND(needle,haystack[,startpos]) returns the position of a specific text within another text

FORMAT(template[, arguments, ....]) returns a formatted string.

LEFT(str,n) left portion of string

LEN(str) length of string (code units count)

LOWER(str) converts str to lowercase

LTRIM(str) removes leading spaces from text

MID(str,pos,n) returns middle n characters from str starting at position pos

PROPER(str) sets the first character in each word to uppercase and the rest to lowercase

REPEAT(str,n) repeats string str n time

REVERSE(str) reverses a string

RIGHT(str,n) right portion of a string

RTRIM(str) removes trailing spaces from text

STR(x,n) number to string conversion

SUBSTITUTE(str,find,replace[,index]) returns a string with some text replaced.

TRIM(str) removes all spaces from text except for single spaces between words

ULEN(str) length of string (character count)

UPPER(str) converts str to uppercase

VALUE(str) string to number conversion

See also