stdlib-js / stdlib

✨ Standard library for JavaScript and Node.js. ✨
https://stdlib.io
Apache License 2.0
4.28k stars 436 forks source link

[RFC]: Add `@stdlib/string/for-each-right` #856

Open kgryte opened 1 year ago

kgryte commented 1 year ago

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

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

kgryte commented 7 months ago

Similar to @stdlib/string/for-each, this package should be decomposed into the following base packages:

AhmedKhaled590 commented 6 months ago

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,

kgryte commented 6 months ago

@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.

AhmedKhaled590 commented 5 months ago

Hi @kgryte
should I proceed with moving on to the others or should I wait?

kgryte commented 5 months ago

@AhmedKhaled590 Looks like that one is near the finish line, so feel free to find another issue.

AhmedKhaled590 commented 5 months ago

@kgryte Okaaay 👍🫡

kgryte commented 4 months ago

@Planeshifter This issue should not have been closed.

kgryte commented 4 months ago

The only package which was implemented was @stdlib/string/base/for-each-right. The other packages still need implementing.

AhmedKhaled590 commented 4 months ago

@kgryte @Planeshifter I will complete working on the two remaining packages