35 lines
800 B
C#
35 lines
800 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ArabicToChineseNumberConverter : MonoBehaviour
|
|
{
|
|
public static string ConvertToChineseNumbers(string input)
|
|
{
|
|
Dictionary<char, string> numberMap = new Dictionary<char, string>
|
|
{
|
|
{ '1', "Ò»" },
|
|
{ '2', "¶þ" },
|
|
{ '3', "Èý" },
|
|
{ '4', "ËÄ" },
|
|
{ '5', "Îå" },
|
|
{ '6', "Áù" },
|
|
{ '7', "Æß" },
|
|
{ '8', "°Ë" },
|
|
{ '9', "¾Å" },
|
|
{ '0', "Áã" }
|
|
};
|
|
|
|
string result = "";
|
|
foreach (char c in input)
|
|
{
|
|
if (numberMap.ContainsKey(c))
|
|
{
|
|
result += numberMap[c];
|
|
}
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|