splitGraphemes method
splitGraphemes Breaks the given string into an array of grapheme cluster strings
Implementation
Iterable<String> splitGraphemes(String str) {
final res = <String>[];
var index = 0;
var brk;
while ((brk = this.nextBreak(str, index)) < str.length) {
res.add(str.substring(index, brk));
index = brk;
}
if (index < str.length) {
res.add(str.substring(index));
}
return res;
}