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..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
DheenadhayalanPosted Sep 12, 2008, 12:21 AM
AlanPosted Sep 11, 2008, 4:35 AM
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