Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Unicode strings differ in length in various languages (2019) | Better HN
Unicode strings differ in length in various languages (2019)
(hsivonen.fi)
2 points · by
mjakl
· 4y ago · 1 comment
Comments
[–]
rurban
4y ago
He is still a bit confused about length vs size. length should return the length (either the count of grapheme clusters or codepoints), and size should return the count of bytes.
It’s not wrong that "🤦🏼♂️".length == 7
hsivonen.fi