hxUnicode
hxUnicode is a cross-platform library for manipulating Unicode string.
lib.haxe.org hxUnicode
Usage
hxUnicode supplies
UnicodeTools and CombiningTools. Declaring them with the using keyword, you can use the functions as them of the String class.using unicode.UnicodeTools; using unicode.CombiningTools;
UnicodeTools
UnicodeTools manipulate each Unicode character."日本語".uLength() == 3 "ру??кий".uCharAt(5) == "и" "☃".uCodeAt(0) == 0x2603 "今日?雪??り???".uIndexOf("雪") == 3
You can convert Code Points into a string.
(0x2600).uCodeToString() == "☀" [0x3007, 0x4E00, 0x4E8C, 0x4E09].uToString() == "〇一二三"
You can validate Unicode strings with
uIsValid or uValidate. uIsValid returns true when the given string is valid. uValidate() throws an Exception when the given string is invalid.UnicodeIter
UnicodeIter is an iterator that returns each Unicode Code Point.CombiningTools
CombiningTools manipulate each combining character sequence.[0x304B, 0x309A].uToString().ucLength() == 1 "f?ɑ̃sɛ".ucLength() == 5
ucOrdering???文字を正?順?(Canonical Ordering)?並?替??文字列を返???。
version #7444, modified 2010-01-02 09:46:55 by mandel59