Hi, I have some strings which have spaces at the end of them. I want to remove the spaces by going backwards. My code:
My code can't delete the characters and doesn't output "Removing space". Can anyone help me?Code:For num = s.Length To 0 Step -1 If Mid(s, num - 1, num) = " " Then Console.WriteLine("Removing space") s = s.Remove(num - 1, 1) Else Exit For End If Next


Reply With Quote
