Skip to content

Remove the bounds check from the foreign implementation of lastIndexOf' #137

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

Merged
merged 2 commits into from
Dec 19, 2020

Conversation

kl0tl
Copy link
Member

@kl0tl kl0tl commented Dec 17, 2020

Fix #91.

@hdgarrood
Copy link
Contributor

I think this is probably a good opportunity to update the docs to make it clear what happens if you supply an index greater than the length of the string?

@kl0tl
Copy link
Member Author

kl0tl commented Dec 18, 2020

I updated the documentation of lastIndexOf' in Data.String.CodePoints, Data.String.CodeUnits and Data.String.NonEmpty.CodeUnits. I didn’t touch at Data.String.NonEmpty.CodePoints because the whole module is undocumented 😬

Copy link
Member

@thomashoneyman thomashoneyman left a comment

Choose a reason for hiding this comment

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

Thanks, @kl0tl!

@JordanMartinez JordanMartinez merged commit 7a94736 into purescript:master Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lastIndexOf' with index greater than string length returns Nothing
4 participants