Back to API Reference
Class
TextMeasure
static
Measures and truncates text by TextLengthUnit. Truncation cuts only on a codepoint or grapheme boundary, so it never splits a surrogate pair, a multi-byte codepoint, or a grapheme cluster.
Length of the whole document in unit. Measures the document SOURCE — in a markup-bearing field hidden tag characters count too; keep limits and counters on plain fields, or accept that they measure source, not the visible projection. For the per-keystroke grapheme path prefer GraphemeCountCache.
