Closed
Description
Description
This RFC proposes adding support for returning the last (visual) character(s) of a string.
Signature:
last( str[, n][options] )
where n
specifies the number of visual characters to return. Default: 1
.
E.g.,
last( 'foo bar' );
// returns 'r'
last( '🐶🐮🐷🐰🐸', 2 );
// returns '🐰🐸'
Package: @stdlib/string/last
Alias: last
Related Issues
None.
Questions
No.
Other
See @stdlib/string/first
for a similar package.
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
Assignees
Labels
RFC feature request which has been accepted.Issue or pull request for adding a new feature.Issue involves or relates to JavaScript.Request for comments. Feature requests and proposed changes.Issue or pull request concerning general utilities.Likely to be challenging but manageable.Normal priority concern or feature request.