Trim characters off of right on a string.
Trim off a certain number of characters on the right side of a string. Here's a quick easy method to cut off an exact number off the right portion without reversing the string and using various other string manipulation techniques.
The concept is simple, find the length of the string
len(MyString)
and then subtract the number of characters you want removed, e.g., 3len(MyString) - 3
We just use this result to count thenumber of characters from the left and keep those using left() function.left(MyString, (len(MyString) - 3))