stdlib
stdlib copied to clipboard
[RFC]: Add `@stdlib/string/for-each-right`
Description
This RFC proposes adding support for invoking a callback for each (visual) character of a string, while iterating from right-to-left.
Signature:
forEachRight( str, clbk[, thisArg] )
where clbk
(similar to @stdlib/utils/for-each-right
) is provided
- value: visual character
- idx: starting character index
- str: input string
Package: @stdlib/string/for-each-right
Alias: forEachRight
Related Issues
None.
Questions
No.
Other
Will require iterating over grapheme cluster breaks. See @stdlib/string/reverse
for such an example.
Checklist
- [X] I have read and understood the Code of Conduct.
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with
RFC:
.
Similar to @stdlib/string/for-each
, this package should be decomposed into the following base packages:
- [x]
@stdlib/string/base/for-each-right
- similar to https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/for-each
- [x]
@stdlib/string/base/for-each-code-point-right
- similar to https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/for-each-code-point
- [ ]
@stdlib/string/base/for-each-grapheme-cluster-right
- similar to https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/string/base/for-each-grapheme-cluster
Hi @kgryte, Hope all is well! I'd be interested in working on this RFC, if it's still available. Could you please assign me to it? Thanks,
@AhmedKhaled590 Sure thing. Please start by working on @stdlib/string/base/for-each-right
. If that goes well, we can move on to the others.
Hi @kgryte
should I proceed with moving on to the others or should I wait?
@AhmedKhaled590 Looks like that one is near the finish line, so feel free to find another issue.
@kgryte Okaaay 👍🫡
@Planeshifter This issue should not have been closed.
The only package which was implemented was @stdlib/string/base/for-each-right
. The other packages still need implementing.
@kgryte @Planeshifter I will complete working on the two remaining packages