-
-
Notifications
You must be signed in to change notification settings - Fork 914
Add support for getting next extended grapheme cluster break #361
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShraddheyaS Overall looks good, with some minor comments, questions, and requested changes. Once we resolve these, this should be ready for merge!
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/benchmark/benchmark.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/docs/types/index.d.ts
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/README.md
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/docs/repl.txt
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/lib/main.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/package.json
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/test/test.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/remove-first/lib/remove_first.js
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/README.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ShraddheyaS Wow! Really great work! Will touch up a couple of minor things on my end. Thanks for this contribution!
lib/node_modules/@stdlib/string/next-grapheme-cluster-break/README.md
Outdated
Show resolved
Hide resolved
|
|
||
| - If `string` is an empty string, the function returns `-1` irrespective of `fromIndex`. | ||
| - If there is no extended grapheme cluster break after `fromIndex`, the function returns `-1`. | ||
| - Note that `fromIndex` does **not** refer to a visual character position, but to an index in the ordered sequence of [UTF-16][utf-16] code units. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside: we may want to consider, if we don't already have such functionality, one or more string utilities (as separate packages) for indexing, and maybe iterating over, visual characters. I believe such utilities would build on the current work.
Resolves #357.
Checklist
develop.developbranch.Description
This pull request:
Related Issues
This pull request:
Questions
No.
Other
No.
@stdlib-js/reviewers