the trim methods don't seem to work at all. has anyone used any of them?
Printable View
the trim methods don't seem to work at all. has anyone used any of them?
post your code:p
this is my code:Code:Dim MyString As String = "floorboards, "
Dim MyChar As Char() = {"r"c, "o"c, "W"c, "l"c, "d"c, "!"c, " "c}
Dim NewString As String = MyString.TrimEnd(MyChar)
Console.WriteLine(NewString)
:D I just asked you to post the code so OTHER people can help you, cuz I'm very beginner.
But I dont know why, that doesnt work. But you can use this instead
Dim NewString As String = RTrim(MyChar)
umm, what does the "c" mean in "r"c ?:rolleyes:Quote:
Originally posted by Psychotron
Code:Dim MyChar As Char() = {"r"c, "o"c, "W"c, "l"c, "d"c, "!"c, " "c}
Trim End worked for me. Here is how I checked it.
Dim MyString As String = "floorboards, "
Dim MyChar As Char() = {"r"c, "o"c, "W"c, "l"c, "d"c, "!"c, " "c}
MsgBox(MyString.Length)
Dim NewString As String = MyString.TrimEnd(MyChar)
MsgBox(NewString.Length)