-
Notifications
You must be signed in to change notification settings - Fork 634
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
chunk
for Text
#6327
Comments
What would |
I would imagine |
What is the use case? Why not just split the string into an array and use |
That's reasonable. Especially given the aforementioned edge case. |
JavaScript uses UTF-16 for its strings and this character has a length of 2. Iterating through it via its length would cause you to split the character in half with most likely gibberish on both sides until it's placed together again. |
I believe we should add a
chunk
util withintext
to complement thechunk
util incollections
. The signature would look as follows.Let me know if this is desirable & I'll submit a PR :)
The text was updated successfully, but these errors were encountered: