string trim numbers

  • Thread starter Thread starter RobcPettit
  • Start date Start date
R

RobcPettit

Hi, using 'mystring = "Robert 123 \par" , Ive used char[] MyChar =
{ '\\', 'p', 'a', 'r', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'0', ':'}; string newstring = mystring.TrimEnd(MyChar);
to trim it. It returns "Robert 123". How can I trim the numbers also.
Regards Robert
 
Would this work instead of what you've done:

string s = "Robert 123 \par";
s = s.split(" ")[0];

-Scott
 
Back
Top