add IndexOfUnicodeBlock function

This commit is contained in:
2020-07-04 13:46:37 +08:00
parent 2e07688151
commit 02cb4bb8b3
2 changed files with 58 additions and 3 deletions

View File

@@ -321,12 +321,22 @@ namespace hgl
supplementary_private_use_area_a,
supplementary_private_use_area_b,
Error=0xFFFF,
BEGIN_RANGE =basic_latin,
END_RANGE =supplementary_private_use_area_b,
RANGE_SIZE =(END_RANGE-BEGIN_RANGE+1)
RANGE_SIZE =(END_RANGE-BEGIN_RANGE+1),
};//
bool IsInUnicodeBlock(const UnicodeBlock &type,const uint32 ch);
/**
* 寻找字符属于那一个Unicode块
*/
const UnicodeBlock IndexOfUnicodeBlock(const u32char ch);
/**
* 判断字符是否属于当前Unicode块
*/
bool IsInUnicodeBlock(const UnicodeBlock &type,const u32char ch);
bool isLatin(const u32char ch); //判断当前字符是否是拉丁字符
bool isCJK (const u16char ch); //判断当前字符是否是CJK字符