Remove Char - CSharp System

CSharp examples for System:String Strip

Description

Remove Char

Demo Code


using System.Linq;
using System.Diagnostics.Contracts;
using System;//from w  w w. java 2  s  . c  o  m

public class Main{
        public static string RemoveChar(this string line, char divider)
        {
            return !line.Contains(divider.ToString()) ? line : RemoveChars(line, new char[] { divider });
        }
}

Related Tutorials