Open dhananjay0610 opened 7 months ago
if we print emoji.length, then it is givin output as 2 for 😃 but for imojis like 🕵️ it gives 5. Thus if we want to check if there is only 1 emoji in input box, then how can we check , initially we thought of checking using emoji.length
new Intl.Segmenter({ granularity: "grapheme" }).segment() should work
new Intl.Segmenter({ granularity: "grapheme" }).segment()
if we print emoji.length, then it is givin output as 2 for 😃 but for imojis like 🕵️ it gives 5. Thus if we want to check if there is only 1 emoji in input box, then how can we check , initially we thought of checking using emoji.length