bmatumbura
asked on
VB.NET RTrim
Dear Experts,
In VB.NET, there is this function:
String.Trim(array<Char>)
which removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.
It looks like there are no RTrim and LTrim equivalents. I need function
RTrim(array<Char>)
that removes the specified array of characters from the end of a string.
In VB.NET, there is this function:
String.Trim(array<Char>)
which removes all leading and trailing occurrences of a set of characters specified in an array from the current String object.
It looks like there are no RTrim and LTrim equivalents. I need function
RTrim(array<Char>)
that removes the specified array of characters from the end of a string.
ASKER
JPJ78:
The LTrim function only strips leading spaces and the RTrim function only strips trailing spaces from a string variable.
I want a function that not only strips SPACES but also other characters like what the String.Trim function does. For example:
RTrim("boxter8366#", "#")
should return: "boxter866"
and
RTrim("boxter8366#", "#6")
should return: "boxter83"
The LTrim function only strips leading spaces and the RTrim function only strips trailing spaces from a string variable.
I want a function that not only strips SPACES but also other characters like what the String.Trim function does. For example:
RTrim("boxter8366#", "#")
should return: "boxter866"
and
RTrim("boxter8366#", "#6")
should return: "boxter83"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
TrimStart = LTrim