Login   /   Register

Trim trailing or leading white spaces

Rate this article
     0 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 50 votes, average: 0 out of 5
Loading ... Loading ...
April 1st, 2008 by daniva

Use the LTrim, RTrim, and Trim to trim white-space from a string.

str1 = "   Advanced QTP   "
Print LTrim( str1 )     ' prints "Advanced QTP   "
Print RTrim( str1 )     ' prints "   AdvancedQTP"
Print Trim( str1 )      ' prints "AdvancedQTP"

Posted in VBScript

Leave a Reply

You must be logged in to post a comment.

This article was viewed 338 times