Addressing whitespaces
i'm developing an application for text comparison. i need to address whitespaces which are of wide variety. is there any way to address them in a single stretch or any other method is there.. do help me..
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

AlanRank #669 · 3.6K reputationPosted Sep 11, 2008, 12:35 AM EDT
If you're using traditional string parsing methods, then the static method Char.IsWhiteSpace() is useful for determining whether a particular character is classified as white space or not:
http://msdn.microsoft.com/en-us/library/t809ektx.aspx
Alternatively, if you're using regular expressions, there's a special metacharacter '\s' to match white space and another one '\S' to match any other character:
http://msdn.microsoft.com/en-us/library/20bw873z(VS.71).aspx
Dheenadhayalan34 reputationPosted Sep 11, 2008, 8:21 PM EDT