Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String.length should mention it counts UTF-16 code units #1047

Closed
malaire opened this issue Oct 9, 2019 · 2 comments · May be fixed by #1055
Closed

String.length should mention it counts UTF-16 code units #1047

malaire opened this issue Oct 9, 2019 · 2 comments · May be fixed by #1055
Labels

Comments

@malaire
Copy link

malaire commented Oct 9, 2019

Documentation of String.length should mention that it returns length as number of UTF-16 code units.

Or alternatively perhaps the note at String type which says "Strings are not lists of characters." should be expanded to say "Strings are not lists of characters, but lists of UTF-16 code points." or something like that.

@showell
Copy link

showell commented Oct 24, 2019

I think the correct terminology is "UTF-16 code units", not "UTF-16 code points." Or you could say "Unicode code points encoded with UTF-16".

@evancz
Copy link
Member

evancz commented Feb 9, 2021

Tracked by the PR

@evancz evancz closed this as completed Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants