add isPunctuation()
This commit is contained in:
parent
517128965c
commit
0e9bb594d7
@ -338,9 +338,10 @@ namespace hgl
|
|||||||
*/
|
*/
|
||||||
bool IsInUnicodeBlock(const UnicodeBlock &type,const u32char ch);
|
bool IsInUnicodeBlock(const UnicodeBlock &type,const u32char ch);
|
||||||
|
|
||||||
bool isLatin(const u32char ch); //判断当前字符是否是拉丁字符
|
bool isLatin (const u32char ch); ///判断当前字符是否是拉丁字符
|
||||||
bool isCJK (const u16char ch); //判断当前字符是否是CJK字符
|
bool isCJK (const u16char ch); ///判断当前字符是否是CJK字符
|
||||||
bool isCJK (const u32char ch); //判断当前字符是否是CJK字符
|
bool isCJK (const u32char ch); ///判断当前字符是否是CJK字符
|
||||||
bool isEmoji(const u32char ch); //判断当前字符是否是表情符号
|
bool isEmoji (const u32char ch); ///判断当前字符是否是表情符号
|
||||||
|
bool isPunctuation (const u32char ch); ///判断当前字符是否是标点符号
|
||||||
}//namespace hgl
|
}//namespace hgl
|
||||||
#endif//HGL_UNICODE_BLOCKS_INCLUDE
|
#endif//HGL_UNICODE_BLOCKS_INCLUDE
|
||||||
|
@ -452,5 +452,19 @@ namespace hgl
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断当前字符是否是标点符号
|
||||||
|
*/
|
||||||
|
bool isPunctuation(const u32char ch)
|
||||||
|
{
|
||||||
|
CHECK_UNICODE_BLOCKS(general_punctuation)
|
||||||
|
CHECK_UNICODE_BLOCKS(supplemental_punctuation)
|
||||||
|
CHECK_UNICODE_BLOCKS(cjk_symbols_and_punctuation)
|
||||||
|
CHECK_UNICODE_BLOCKS(cuneiform_numbers_and_punctuation)
|
||||||
|
CHECK_UNICODE_BLOCKS(ideographic_symbols_and_punctuation)
|
||||||
|
|
||||||
|
return(false);
|
||||||
|
}
|
||||||
|
|
||||||
#undef CHECK_UNICODE_BLOCKS
|
#undef CHECK_UNICODE_BLOCKS
|
||||||
}//namespace hgl
|
}//namespace hgl
|
Loading…
x
Reference in New Issue
Block a user