GlareDB

String Function Reference

ascii

Get the ascii code of the first character of the argument.

bit_length

Get the number of bits in a string or blob.

btrim

Trim matching characters from both sides of the string.

byte_length

Get the number of bytes in a string or blob.

char_length

Get the number of characters in a string.

character_length

Get the number of characters in a string.

concat

Concatenate many strings into a single string.

contains

Check if string contains a search string.

ends_with

Check if a string ends with a suffix.

initcap

Convert first letter of each word to uppercase.

left

Get the leftmost N characters of a string.

length

Get the number of characters in a string.

like

Check if a string matches the given pattern.

lower

Convert the string to lowercase.

lpad

Left pad a string with spaces until the resulting string contains 'count' characters.

ltrim

Trim matching characters from the left side of the string.

octet_length

Get the number of bytes in a string or blob.

prefix

Check if a string starts with a prefix.

repeat

Repeat a string some number of times.

reverse

Reverse the input string.

Get the rightmost N characters of a string.

rpad

Right pad a string with spaces until the resulting string contains 'count' characters.

rtrim

Trim whitespace from the right side of the string.

starts_with

Check if a string starts with a prefix.

strpos

Returns the position of a substring within a string. Returns 0 if the substring is not found.

substr

Get a substring of a string starting at an index until the end of the string. The index is 1-based.

substring

Get a substring of a string starting at an index until the end of the string. The index is 1-based.

suffix

Check if a string ends with a suffix.

trim

Trim matching characters from both sides of the string.

upper

Convert the string to uppercase.