The following lists string functions:

Name Description
concat() Concatenate arguments into one CHAR string.
format() Convert FLOAT or DOUBLE to CHAR string with specified precision.
length() Return string length.
locate() Return the position of a substring within another string.
lpad() Return a CHAR string left-padded with specified string.
rpad() Return a CHAR string right-padded with specified string.
substr() Return a CHAR substring as specified.

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.