Open Group CLI String Functions

From Apache OpenOffice Wiki
Jump to: navigation, search



String Functions Function Returns
ASCII(string) Integer representing the ASCII code value of the leftmost character in string.
CHAR(code) Character with ASCII code value code, where the code is between 0 and 255.
CONCAT(string1, string2) Character string formed by appending string2 to string1. If a string is null, the result is DBMS-dependent.
DIFFERENCE(string1, string2) Integer indicating the difference between the values returned by the function SOUNDEX for string1 and string2.
INSERT(string1, start, length, string2) A character string formed by deleting length characters from string1 beginning at the start, and inserting string2 into string1 at the start.
LCASE(string) Converts all uppercase characters in string to lowercase.
LEFT(string, count) The count leftmost characters from string.
LENGTH(string) Number of characters in string, excluding trailing blanks.
LOCATE(string1, string2[, start]) Position in string2 of the first occurrence of string1, searching from the beginning of string2. If start is specified, the search begins from position start. A 0 is returned if string2 does not contain string1. Position 1 is the first character in string2.
LTRIM(string) Characters of string with leading blank spaces removed.
REPEAT(string, count) A character string formed by repeating string count times.
REPLACE(string1, string2, string3) Replaces all occurrences of string2 in string1 with string3.
RIGHT(string, count) The count rightmost characters in string.
RTRIM(string) The characters of string with no trailing blanks.
SOUNDEX(string) A character string that is data source-dependent, representing the sound of the words in string, such as a four-digit SOUNDEX code, or a phonetic representation of each word.
SPACE(count) A character string consisting of count spaces.
SUBSTRING(string, start, length) A character string formed by extracting length characters from string beginning at start.
UCASE(string) Converts all lowercase characters in string to uppercase.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages