string s = "1 3 6 0";
while (s.Contains(" ")) s.Replace(" ", " ");
^^ ^^ ^
But of course, that only counts spaces... If you want to get rid of other
whitespace, you'll have to account for that. Really, there's no reason
NOT to use the regular expressions.
-mdb
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.