I would like to discard the remaining characters (which can be any characters) in my string after I encounter a space.
Eg. I would like the string "10 1/2" to become "10";
Currently I'm using Split, but this seems like overkill:
string TrimMe = "10 1/2";
string[] cleaned = TrimMe.Split(new char[] {' '});
return string[0];
I feel there should be an easier way.