For the complete documentation index, see llms.txt. This page is also available as Markdown.

Length

type

returns

Getter

number

Explanation

Returns the size of the string accounting for surrogate characters.

Examples

"".len == 0
"🐐".len == 1
"1\n2".len == 3
"Hello".len == 5
"1 2 3".len == 5

Last updated

Was this helpful?