Skip to content

String.replace() #24

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

Open
gossi opened this issue Jun 2, 2014 · 1 comment
Open

String.replace() #24

gossi opened this issue Jun 2, 2014 · 1 comment

Comments

@gossi
Copy link

gossi commented Jun 2, 2014

Hey,

while I do like the two prototypes for String.replace() it's actually an issue to properly document these two methods. I think it would be better to split them into two methods.

  • String.replace($search, $replacement) and
  • String.replaceMap(array $replacementMap)

While I'm not sure about the replaceMap method name. Suggestions are welcome.

gossi

@gossi
Copy link
Author

gossi commented Jun 2, 2014

I just stumbled upon supplant which is a perfect method name for the latter case. I'd go with it in my own repo gossi/oophp.

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

No branches or pull requests

1 participant