CSharp examples for System:String Strip
Strip Spaces
using System.Text.RegularExpressions; using System.Text; using System.Net; using System.Linq; using System.Drawing; using System;//from w w w. j ava 2 s . com public class Main{ public static string StripSpaces(this string str) { return string.IsNullOrEmpty(str) ? str : Regex.Replace(str, @"\s+", "", RegexOptions.Multiline); } }