Answers for "c# convertir caracter con tilde"

C#
0

c# convertir caracter con tilde

public static class StringExtensions
{
    public static string SinTildes(this string texto) =>
        new String(
            texto.Normalize(NormalizationForm.FormD)
            .Where(c => CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.NonSpacingMark)
            .ToArray()
        )
        .Normalize(NormalizationForm.FormC);
}
Posted by: Guest on November-12-2020

C# Answers by Framework

Browse Popular Code Answers by Language