January 25, 2021
Hot Topics:

Advanced String Functions

  • By John Percival
  • Send Email »
  • More Articles »

Last week, we looked at the basic string functions, and some of their applications. This week, we will look at the more advanced string functions, and put them into use.

LTrim$, RTrim$, Trim$

These are the first functions that we will look at this week. They only just fall into the advanced category. They are used to remove preceding and trailing spaces from strings. For example:

mystring = " Hello! "
LTrim$(mystring) contains "Hello! "
Rtrim$(mystring) contains " Hello!"
Trim$(mystring) contains "Hello!"
It is equal to LTrim$(RTrim$(mystring))

This function is particularly useful for API functions, which often return strings with spaces preceding and trailing the string.



Page 1 of 2

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date