simple and light persian number converter, for use in .NET Core projects.
you can add this package from nuget.
Install-Package Moraba.Persian.Numbers.Core
dotnet add package Moraba.Persian.Numbers.Core
try
{
//convert persian number to english
string persianNumbers = "-۱۲۳۴۵";
string englishNumber = Moraba.Persian.Numbers.Convert.PersianToEnglish(persianNumbers);;
//output : "-12345"
//convert numbers to persian text
string numberText = Moraba.Persian.Numbers.Convert.NumberToText(persianNumbers);
//output : "منفی دوازده هزار و سیصد و چهل و پنج"
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}