---
id: unicode-len
name: Unicode.len
category: unicode
kind: namespace-method
tokens: Unicode.len
sig: Unicode.len(s) -> int
tip: Number of code points in a string (not bytes).
order: 1
ns: Unicode
member: len
---
Counts the code points in a UTF-8 string — the correct "length" for most text logic, unlike a raw byte count which over-counts anything non-ASCII. Contrast byte_len (storage size) and grapheme_len (user-perceived characters).
Parameters:
- `s` — the UTF-8 string
```ludic
program Len {
entry {
print(Unicode.len("hello")) # 5
}
}
```