The following lists string functions:

Name Description
CONCAT() Concatenates arguments into one CHAR string.
FORMAT() Converts FLOAT or DOUBLE to CHAR string with specified precision.
LENGTH() Returns string length.
LOCATE() Returns the position of a substring within another string.
LOWER() Converts all letters in the specified string to lowercase.
LPAD() Returns a CHAR string left-padded with specified string.
RPAD() Returns a CHAR string right-padded with specified string.
SUBSTR() Returns a CHAR substring as specified.
UPPER() Converts all letters in the specified string to uppercase.

CONCAT

concat(string1, string2, ...)

The CONCAT function concatenates multiple string arguments into one CHAR string.


FORMAT

format(number, precision)

The FORMAT function converts a number to a CHAR string with specified precision.


LENGTH

length(string)

The LENGTH function returns the length of the given string.

--

LOCATE

locate(string1, string2, [start_pos])

The LOCATE function returns the position of the first occurrence of string1 in string2 starting at position start_pos. It returns 0 if string1 is not in string2. If start_pos is not given, it is assumed to be 1.


LPAD

lpad(string, len, padstring)

The LPAD function left pads string with padstring to a CHAR string with length len.


RPAD

rpad(string, len, padstring)

The RPAD function right pads string with padstring to a CHAR string with length len.


SUBSTR

substr(string, pos, len)

The SUBSTR function returns a CHAR string with length len starting from position pos of string.