Skip to content
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

feat: add next-code-point-index string package #1117

Merged
merged 13 commits into from
Nov 10, 2023
Merged

Conversation

steff456
Copy link
Contributor

@steff456 steff456 commented Oct 30, 2023

Part of #1062

Description

What is the purpose of this pull request?

This pull request:

  • Adds @stdlib/string/next-code-point-index

Related Issues

Does this pull request have any related issues?

This pull request:

Part of #1062

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

This PR depends on the package @stdlib/string/num-code-points available in #1097

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@steff456 steff456 requested a review from kgryte October 30, 2023 17:32
@steff456 steff456 self-assigned this Oct 30, 2023
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point $\color{green}162/162$
$\color{green}+100.00\%$
$\color{green}22/22$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}162/162$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Oct 31, 2023
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point $\color{green}162/162$
$\color{green}+100.00\%$
$\color{green}22/22$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}162/162$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{green}161/161$
$\color{green}+100.00\%$
$\color{green}22/22$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}161/161$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{green}160/160$
$\color{green}+100.00\%$
$\color{green}22/22$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}160/160$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{green}159/159$
$\color{green}+100.00\%$
$\color{green}22/22$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}159/159$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{green}154/154$
$\color{green}+100.00\%$
$\color{green}22/22$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}154/154$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@steff456 Thanks for working on this. There are a few discrepancies among return values. And I left a question regarding what should happen for unpaired surrogates.

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{green}154/154$
$\color{green}+100.00\%$
$\color{green}22/22$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}154/154$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{green}157/157$
$\color{green}+100.00\%$
$\color{green}25/25$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}157/157$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{green}157/157$
$\color{green}+100.00\%$
$\color{green}26/26$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}157/157$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

Comment on lines 154 to 155
out = nextCodePointIndex( '𐒻𐓟𐒻𐓟', 1 );
t.strictEqual( out, 3, 'returns expected value' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
out = nextCodePointIndex( '𐒻𐓟𐒻𐓟', 1 );
t.strictEqual( out, 3, 'returns expected value' );
out = nextCodePointIndex( '𐒻𐓟𐒻𐓟', 0 );
t.strictEqual( out, 2, 'returns expected value' );

@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
string/next-code-point-index $\color{red}149/151$
$\color{green}+98.68\%$
$\color{red}19/20$
$\color{green}+95.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{red}149/151$
$\color{green}+98.68\%$

The above coverage report was generated for the changes in this PR.

Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kgryte kgryte merged commit fc8fba0 into develop Nov 10, 2023
8 of 9 checks passed
@kgryte kgryte deleted the next-code-point branch November 10, 2023 21:16
@kgryte kgryte changed the title feat: add next-code-point string package feat: add next-code-point-index string package Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue or pull request for adding a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants