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(stdlib): Add replacement functions to String module #1441

Merged
merged 11 commits into from
Nov 8, 2022

Conversation

spotandjake
Copy link
Member

@spotandjake spotandjake commented Oct 3, 2022

This pr implements String.replaceFirst and String.replaceLastand String.replaceAll. let me know if you guys want the naming scheme to be changed.

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Looks pretty good! Just a couple of tweaks and this is perfect code-wise 🙂

stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
@spotandjake spotandjake changed the title feat(stdlib): Implement replaceFirst and replaceLast feat(stdlib): Implement replaceFirst and replaceLast and replaceAll Oct 4, 2022
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Just a few more updates to the comments, but otherwise looks great :)

stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
Co-authored-by: Oscar Spencer <oscar.spen@gmail.com>
@spotandjake
Copy link
Member Author

Applied Those Changes

@ospencer ospencer changed the title feat(stdlib): Implement replaceFirst and replaceLast and replaceAll feat(stdlib): Implement String.replaceFirst, String.replaceLast, and String.replaceAll Oct 19, 2022
Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

Great work @spotandjake!

@ospencer ospencer requested a review from a team November 7, 2022 23:16
Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
@spotandjake
Copy link
Member Author

Applied That Change

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

Needs some docs work and you added a file that shouldn't be here. Please be careful when committing!

compiler/test/stdlib/string.test.gr Show resolved Hide resolved
compiler/test/stdlib/string.test.gr Outdated Show resolved Hide resolved
compiler/test/stdlib/string.test.gr Show resolved Hide resolved
compiler/test/stdlib/string.test.gr Outdated Show resolved Hide resolved
compiler/test/stdlib/string.test.gr Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
string.md Outdated Show resolved Hide resolved
@phated phated changed the title feat(stdlib): Implement String.replaceFirst, String.replaceLast, and String.replaceAll feat(stdlib): Add replacement functions to String module Nov 8, 2022
@spotandjake
Copy link
Member Author

Applied Those Suggestions

stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
stdlib/string.gr Outdated Show resolved Hide resolved
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks @spotandjake

@phated phated merged commit 5606cd2 into grain-lang:main Nov 8, 2022
@github-actions github-actions bot mentioned this pull request Nov 8, 2022
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.

3 participants