Length
type
returns
Getter
number

Explanation

Returns the size of the string accounting for surrogate characters.

Examples

1
"".len == 0
2
"🐐".len == 1
3
"1\n2".len == 3
4
"Hello".len == 5
5
"1 2 3".len == 5
Copied!
Last modified 1yr ago
Copy link