Skip to content

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

Open
@kgryte

Description

@kgryte

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

Metadata

Metadata

Labels

AcceptedRFC feature request which has been accepted.FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.RFCRequest for comments. Feature requests and proposed changes.UtilitiesIssue or pull request concerning general utilities.difficulty: 3Likely to be challenging but manageable.priority: LowLow priority concern or feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions