Cross-platform iteration of Unicode string (counting Graphemes using ICU)

后端 未结 3 1790
南旧
南旧 2020-12-02 19:20

I want to iterate each character of a Unicode string, treating each surrogate pair and combining character sequence as a single unit (one grapheme).

<
3条回答
  •  春和景丽
    2020-12-02 20:02

    You should be able to use the ICU BreakIterator for this (the character instance assuming it is feature-equivalent to the Java version).

提交回复
热议问题