Strip Newlines - CSharp System

CSharp examples for System:String Strip

Description

Strip Newlines

Demo Code


using System.Text.RegularExpressions;
using System.Linq;
using System.Collections.Generic;
using System;/*from  ww w  .  j  a v  a 2  s.co m*/

public class Main{
        public static string StripNewlines(this string input)
        {
            return Regex.Replace(input, "\n", "    ", RegexOptions.Compiled);
        }
}

Related Tutorials