此功能内置在Character.UnipreBlock类中。与日语相关的Unipre块的一些示例:
Character.UnipreBlock.of('誰') == CJK_UNIFIED_IDEOGRAPHSCharacter.UnipreBlock.of('か') == HIRAGANACharacter.UnipreBlock.of('フ') == KATAKANACharacter.UnipreBlock.of('フ') == HALFWIDTH_AND_FULLWIDTH_FORMSCharacter.UnipreBlock.of('!') == HALFWIDTH_AND_FULLWIDTH_FORMSCharacter.UnipreBlock.of('。') == CJK_SYMBOLS_AND_PUNCTUATION
但是,一如既往,魔鬼在细节中:
Character.UnipreBlock.of('A') == HALFWIDTH_AND_FULLWIDTH_FORMS
哪里
A是全角字符。因此,这与
フ上面的半角片假名属于同一类别。请注意,全角
A与常规(半角)不同
A:
Character.UnipreBlock.of('A') == BASIC_LATIN
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)