Skip to content

add utf16 code points range #105

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

Closed

Conversation

patricklx
Copy link
Contributor

@patricklx patricklx commented Jul 15, 2025

content-tag is counting chars. js length is counting utf16 CodePoints.

so, we want
str.encode_utf16().count()

much faster:
(if i did it right?)
perf

I think its more user friendly to let the user do str.slice(...), instead of [...str].slice(...).join('')#

ruste example

js example

any better naming suggestions?

@patricklx patricklx force-pushed the patch-2 branch 2 times, most recently from 66d97d4 to 205a21c Compare July 15, 2025 15:17
@patricklx patricklx changed the title use utf16 code points add utf16 code points range Jul 15, 2025
@ef4 ef4 deleted the branch embroider-build:nvp/character-offest-repro July 15, 2025 15:35
@ef4 ef4 closed this Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants