graphemeSegments
graphemeSegments(
text): readonlystring[]
Defined in: visible-width.ts:23
Splits text into user-perceived characters (Unicode grapheme clusters),
after stripping control characters (undefined width in any monospace
rendering).
A cluster groups a base character with its combining marks and ZWJ sequences (flags, multi-part emoji), so those never contribute extra width on top of their base character in visibleWidth.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”readonly string[]