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

Support append() #2046

Merged
merged 5 commits into from
May 17, 2024
Merged

Support append() #2046

merged 5 commits into from
May 17, 2024

Conversation

gyreas
Copy link
Contributor

@gyreas gyreas commented May 16, 2024

append(suffix, base) takes a append and a base string with space-separated words,
and append suffix to the end of each word in the base string.

For example, append('.c', 'foo bar baz') -> 'foo.c bar.c baz.c'

addsuffix(suffix, base) takes a `suffix` and a (possibly space-separated) base string,
and append `suffix` to the end of each word in the base string;
for example, addsuffix('.c', 'foo bar baz') -> 'foo.c bar.c baz.c'
src/function.rs Outdated Show resolved Hide resolved
@casey
Copy link
Owner

casey commented May 17, 2024

Seems reasonable to me! How about calling it append, since that's shorter, and using split_whitespace instead of split(" ")?

@gyreas
Copy link
Contributor Author

gyreas commented May 17, 2024

Shorter names are okay too. This is carried over from when it was about porting make functions.

I'll incorporate the suggestion changes. Thanks for your feedbacks

@gyreas gyreas requested a review from laniakea64 May 17, 2024 06:16
Copy link
Contributor

@laniakea64 laniakea64 left a comment

Choose a reason for hiding this comment

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

I'm not just maintainer, did you mean to request review from casey? Anyway this looks good to me, append() now behaves according to make documentation of addsuffix as intended. 👍

@gyreas gyreas changed the title Support addsuffix() Support append() May 17, 2024
@casey casey enabled auto-merge (squash) May 17, 2024 23:08
@casey
Copy link
Owner

casey commented May 17, 2024

Nice, LGTM! I added <sup>master</sup> in the readme, which indicates that it still hasn't been released. I'll remove that when it makes it into a release.

@casey casey closed this May 17, 2024
auto-merge was automatically disabled May 17, 2024 23:09

Pull request was closed

@casey
Copy link
Owner

casey commented May 17, 2024

Gah, didn't mean to close.

@casey casey reopened this May 17, 2024
@casey casey enabled auto-merge (squash) May 17, 2024 23:09
@casey casey merged commit eb60518 into casey:master May 17, 2024
10 checks passed
neunenak pushed a commit to neunenak/just that referenced this pull request May 18, 2024
@gyreas
Copy link
Contributor Author

gyreas commented May 18, 2024

Nice, LGTM! I added <sup>master</sup> in the readme, which indicates that it still hasn't been released. I'll remove that when it makes it into a release.

Got it!

@gyreas gyreas deleted the add-suffix branch May 18, 2024 07:26
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