If I have an arbitrary String like this:
final family = 'u{1F468}u{200D}u{1F469}u{200D}u{1F467}'; // ????????
final myString = 'Let me introduce my $family to you.';
And I know the String index of the character after the family emoji (the space) is 28
, how do I find the String index of the first code unit of the family emoji? In other words, how to I find the length in UTF-16 code units of the family emoji?
![enter image description here](https://i.stack.imgur.com/4T8Nl.png)
I've asked a similar question before, but that was before the characters package came out. Is there anything I can do to map the grapheme cluster index to the String index?
The reason I'm asking is that I want to programmatically backspace by grapheme cluster inside a Flutter TextField.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…