Removing embedded (white) space from string

  • Thread starter Thread starter Julie
  • Start date Start date
J

Julie

I currently use the following to remove embedded spaces from strings:

dest = str.Replace(" ", "");

and resort to something like the following to remove white space:

dest = str.Replace(" ", "").Replace("\t", "").etc.;

Is there a better, more efficient way?
 
Ya know, sometime I have GOT to learn more about regular expressions. I've never really been able to grasp the concept of them,
though I know they are very powerful.
 
Back
Top