using System.Collections; using System.Collections.Generic; using UnityEngine; public class ArabicToChineseNumberConverter : MonoBehaviour { public static string ConvertToChineseNumbers(string input) { Dictionary numberMap = new Dictionary { { '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; } }