CSharp examples for System:String Replace
Replace all accents in the given string.
using System.Xml.Serialization; using System.Text.RegularExpressions; using System.Text; using System.Reflection; using System.IO;//from ww w . jav a 2s. c o m using System.Globalization; using System.Data.Entity.ModelConfiguration.Design.PluralizationServices; using System; public class Main{ #endregion RemoveSpecial #region ReplaceAccents /// <summary> /// Replace all accents in the given string. /// </summary> public static string ReplaceAccents(string strInput) { byte[] arrBytes = Encoding.GetEncoding(1251).GetBytes(strInput); return Encoding.ASCII.GetString(arrBytes); } }