So here the situation.
I have multiple strings that begin and end with a random amount of spaces. The problem is the string contains multiple words so I can\'t just rep
Try
yourString.Trim();
Removes all occurrences of white space characters from the beginning and end of this instance.
[Visual Basic] Overloads Public Function Trim() As String [C#] public string Trim(); [C++] public: String* Trim(); [JScript] public function Trim() : String; Return Value
A new String equivalent to this instance after white space characters are removed from the beginning and end.
See: http://msdn.microsoft.com/en-us/library/aa904317(v=vs.71).aspx