Difference between revisions of "Documentation/DevGuide/Basic/String Functions"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (1 revision(s))
m (Robot: Changing Category:Basic and Dialogs)
Line 21: Line 21:
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Basic and Dialogs]]
+
 
 +
[[Category:Documentation/Developers Guide/Basic and Dialogs]]

Revision as of 12:14, 4 June 2008



OpenOffice.org Basic supports several runtime functions for string manipulation. Some of the functions are explained briefly in the following:

  • Asc returns the the Unicode value.
  • Chr returns 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 '"' or the carriage return code (chr(13)) that can not be written in the "" notation.
  • Str converts a numeric expression to a string.
  • Val converts a string to a numeric value.
  • LCase converts all letters in a string to lowercase. Only uppercase letters within the string are converted. All lowercase letters and nonletter characters remain unchanged.
  • UCase converts characters in a string to uppercase. Only lowercase letters in a string are affected. Uppercase letters and all other characters remain unchanged.
  • Left returns the leftmost “n” characters of a string expression.
  • Mid returns the specified portion of a string expression.
  • Right returns the rightmost "n" characters of a string expression.
  • Trim removes all leading and trailing spaces of a string expression.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools