PdfRpt.Core.Helper.PersianNumber.ToEnglishNumbers C# (CSharp) Method

ToEnglishNumbers() public static method

Converts Persian digits of a given string to their equivalent English digits.
public static ToEnglishNumbers ( this data ) : string
data this Persian number
return string
        public static string ToEnglishNumbers(this string data)
        {
            if (string.IsNullOrEmpty(data)) return string.Empty;
            return
               data.Replace("۰", "0")
                .Replace("۱", "1")
                .Replace("۲", "2")
                .Replace("۳", "3")
                .Replace("۴", "4")
                .Replace("۵", "5")
                .Replace("۶", "6")
                .Replace("۷", "7")
                .Replace("۸", "8")
                .Replace("۹", "9");
        }