Showing posts with label Remove Spaces From String. Show all posts
Showing posts with label Remove Spaces From String. Show all posts

Wednesday, May 6, 2009

Remove Spaces From String


using System.Text.RegularExpressions;

private string RemoveSpaces(string str)

{

string result = "";Regex regulEx = new Regex(@"[\s]+");

result = regulEx.Replace(str," ");return result;

}