package
return ret;
}/**
* * @param char unicode格式的乙個中文字元
* @return 中文字元的聲母
* @example
* var chinesechar:string = "我";
* var py:string = convert.convertchar(chinesechar);
* trace(py); //w
*/public static function convertchar(chinesechar:string):string
private static function isin(from:int, to:int, value:int):boolean
/***
* @param chinesechar unicode格式的乙個中文字元
* @return 是中文返回true,不是返回flase
*/public static function ischinese(chinesechar:string):boolean
return true;}}
}
中文轉拼音
中文轉拼音的類c 實現 code using system using system.collections.generic using system.text using system.collections endregion 獲得漢字的拼音,如果輸入的是英文本元將原樣輸出,中文標點符號將被忽略...
iOS 中文轉拼音
cfstringtransform 這篇文章後,發現系統本身已經提供了乙個這樣的函式。ios在corefoundation中提供了cfstringtransform函式,但在foundation中卻沒有相對應的方法。它的定義如下 boolean cfstringtransform cfmutable...
C 中文轉拼音
專案裡面有乙個功能是將使用者的名字轉變成拼音全拼,但是在使用過程中,有很多人的名字是生僻字,程式根本找不到那個字的拼音,後來看 才發現,轉拼音這個類居然是將乙個個的漢字列舉的 且不說這樣列舉會增加多大的工作量,光這漢字之多,能列舉的完嗎?建立乙個pinyinhelper類,引入microsoft.i...