Skip to content

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

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

Open
3 tasks done
kgryte opened this issue Feb 7, 2023 · 9 comments · Fixed by #1369
Open
3 tasks done

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

kgryte opened this issue Feb 7, 2023 · 9 comments · Fixed by #1369
Assignees
Labels
Accepted RFC feature request which has been accepted. difficulty: 3 Likely to be challenging but manageable. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! JavaScript Issue involves or relates to JavaScript. priority: Low Low priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. Utilities Issue or pull request concerning general utilities.

Comments

@kgryte
Copy link
Member

kgryte commented Feb 7, 2023

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

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
@kgryte kgryte added RFC Request for comments. Feature requests and proposed changes. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! labels Feb 7, 2023
@kgryte
Copy link
Member Author

kgryte commented Jan 4, 2024

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

@kgryte kgryte added Needs Discussion Needs further discussion. difficulty: 3 Likely to be challenging but manageable. priority: Low Low priority concern or feature request. Utilities Issue or pull request concerning general utilities. JavaScript Issue involves or relates to JavaScript. Accepted RFC feature request which has been accepted. and removed Needs Discussion Needs further discussion. labels Feb 23, 2024
@AhmedKhaled590
Copy link
Contributor

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
Copy link
Member Author

kgryte commented Feb 24, 2024

@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
Copy link
Contributor

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

@kgryte
Copy link
Member Author

kgryte commented Feb 25, 2024

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

@AhmedKhaled590
Copy link
Contributor

@kgryte Okaaay 👍🫡

Planeshifter added a commit that referenced this issue Feb 25, 2024
PR-URL: #1369
Closes: #856 

Signed-off-by: Philipp Burckhardt <pburckhardt@outlook.com>
Co-authored-by: Philipp Burckhardt <pburckhardt@outlook.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Jaysukh Makvana <jaysukhmakvana2004@gmail.com>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
@kgryte kgryte reopened this Apr 8, 2024
@kgryte
Copy link
Member Author

kgryte commented Apr 8, 2024

@Planeshifter This issue should not have been closed.

@kgryte
Copy link
Member Author

kgryte commented Apr 8, 2024

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

@AhmedKhaled590
Copy link
Contributor

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

kgryte added a commit that referenced this issue Apr 20, 2024
PR-URL: #2163
Ref: #856
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted RFC feature request which has been accepted. difficulty: 3 Likely to be challenging but manageable. Feature Issue or pull request for adding a new feature. Good First Issue A good first issue for new contributors! JavaScript Issue involves or relates to JavaScript. priority: Low Low priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. Utilities Issue or pull request concerning general utilities.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants