Best method for removing white spaces from the end of a string
c#, string
Solution
You could just use `Trim()` or if you just want to apply to just the end `TrimEnd()`
string s = "test ";
s = s.Trim();
s = s.TrimEnd();
Problem
Possible Duplicate: How automatically remove all white spaces start or end in a string I have a number of strings that I need to trim whitespaces from, however I only need to remove them from the end. They are being used for company and individual names, so it's ok for there to be spaces in the middle of the string.