Rtrim, LTrim, and Trim are functions to delete the empty or space character.
RTrim is function to delete empty or space character on the right side.
LTrim is function to delete empty or space character on the left side.
Trim is function to delete empty or space character on the whole strings.
Here the example of using those functions:
Dim MyString As String
MyString = " Layong Lim Okay " -> 36 Characters
Debug.Print "Using RTrim Function: " + RTrim(MyString) + ", And Length of Strings = " & Len(RTrim(MyString))
Debug.Print "Using LTrim Function: " + LTrim(MyString) + ", And Length of Strings = " & Len(LTrim(MyString))
Debug.Print "Using Trim Function: " + Trim(MyString) + ", And Length of Strings = " & Len(Trim(MyString))
Here the result:
Using RTrim Function: Layong Lim Okay, And Length of Strings = 24
Using LTrim Function: Layong Lim Okay , And Length of Strings = 27
Using Trim Function: Layong Lim Okay, And Length of Strings = 15
Okay. Hpe you understand.. :P:P
Enjoy it…

0 comments:
Post a Comment