How to Convert Persian Digits in variable to English Digits Using Culture?

后端 未结 15 2138
终归单人心
终归单人心 2021-02-02 07:10

I want to change persian numbers which are saved in variable like this :

string Value=\"۱۰۳۶۷۵۱\"; 

to

string Value=\"1036751\"         


        
15条回答
  •  难免孤独
    2021-02-02 07:31

    Simply Use the code below :

    private string toPersianNumber(string input)
    {
      string[] persian = new string[10] { "۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹" };
    
       for (int j=0; j

提交回复
热议问题