klyn.String.size
property
public readonly native property size as UInt
Description

Returns the number of Unicode scalar values in the string.

Supplementary characters count once even though their UTF-8 storage uses four bytes and their UTF-16 representation uses two code units.

Returns

The number of values returned by scalar indexing.

Example
assert "A😀B".size == 3u