dcsimg
December 7, 2016
Hot Topics:

Advanced String Functions

  • November 19, 2002
  • 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.

Syntax:

LTrim(string)
RTrim(string)
Trim(string)




Page 1 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

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

Sitemap | Contact Us

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