String Functions
From Apache OpenOffice Wiki
< Documentation | DevGuide
Apache OpenOffice Basic supports several runtime functions for string manipulation. Some of the functions are explained briefly in the following:
Ascreturns the Unicode value of the first character of its string parameter.Chrreturns a string containing the character that is specified by the ASCII or Unicode value passed to the function. This function is used to represent characters, such as the carriage return code (Chr(13)), that cannot be written in the "" notation. This is not necessary for the " character, which can be included in a string literal by simply doubling it, eg.s = "This string has ""embedded"" quotes"Strconverts a numeric expression to a string in a locale-independent manner (contrary to theCStrfunction).Valconverts a string to a numeric value.LCaseconverts all letters in a string to lowercase. Only uppercase letters within the string are converted. All lowercase letters and nonletter characters remain unchanged.UCaseconverts characters in a string to uppercase. Only lowercase letters in a string are affected. Uppercase letters and all other characters remain unchanged.Leftreturns the leftmost “n” characters of a string expression.Midreturns the specified portion of a string expression.Rightreturns the rightmost "n" characters of a string expression.Trimremoves all leading and trailing spaces of a string expression.
All these functions are fully compatible with VBA and all functions returning a string can be specified with a trailing $ like Mid$.
| Content on this page is licensed under the Public Documentation License (PDL). |