Tuesday, January 15, 2008

How do I remove unnecessary white spaces from collection of strings?

Actually this question I have gathered from CDNUG forum. So as usually, I tried to give answer and finally manage write below code.

The string need to remove unwanted white spaces:

“ I    Love          ASP.NET          forum. “

The final output should be like below:

“I Love ASP.NET forum.”

Solution:

FAQ00015

Labels:

1 Comments:

At March 11, 2008 2:34 PM, Anonymous Anonymous said...

Or you could have done it a better way, and just used search-and-replace with regular expressions.

 

Post a Comment

<< Home