-
Notifications
You must be signed in to change notification settings - Fork 450
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 prepend() #2045
Support prepend() #2045
Conversation
Seems reasonable to me! How about calling it |
This should also be documented in the readme (along with addsuffix). |
README? Ah! No wonder I feel something is still missing! Alright, I do that across the PRs. Thanks!
That's a shorter name, okay! |
prepend(prefix, base) takes a `prefix` and a (possibly space-separated) `base` string, and append `prefix` to the beginning of each word in the base string; for example, prepend('src', 'foo bar baz') -> 'src/foo src/bar src/baz'
LGTM! |
This PR adds a convenient
prepend
function.prepend(prefix, base)
takes aprefix
and abase
string with space-separated words,and prepends
prefix
to the beginning of each word in the base string.For example:
prepend('src', 'foo bar baz')
-> 'src/foo src/bar src/baz'