How do I get the correct length of a string of emoji?

I have a text box where I only want one emoji character in it. However, the length of emojis according to App Inventor (and other programming languages too) can vary from 2 to over 25. Is there anyway I can test for the length (as seen by a human) of a string of emoji?

See if this helps...

I think I got it. I can use the grapheme-splitter library in the WebView Javascript Processor, and count the number of items in the array.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.