Intl.Segmenter Playground

The library character counter: one slot per code unit, one tile per grapheme. Why one emoji's .length can be 8, counted by the real Intl.Segmenter. An…

Why it matters

A bio length limit, a cut preview, a cursor position, a character counter: they all go wrong with .length once there is an emoji or a combined letter. The Segmenter gives a count that matches what a person sees, and knows the language.

Try it in this playground