Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - What is L-trim function will do?

asked marvit August 22, 2014 07:36 AM  

What is L-trim function will do?


1 Answers

answered By Dharma   0  
 Trims functions are used to remove blank spaces from the string.

There are 3 trim functions in QTP as mentioned below.

    Ltrim     - removes leading (at the beginning) spaces from the string
    Rtrim     - removes trailing (at the end )spaces from the string
    trim       - removes leading and trailing spaces from the string

Example -

print ltrim("  hello Tester   ")
'it will print "hello Tester   "

print rtrim("  hello Tester   ")
'it will print "  hello Tester"

print trim("  hello Tester   ")
'it will print "hello Tester"
'Please note that it does not remove the spaces from the middle of the string.
   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!