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

[11.x] feat: add Str::doesntContain() method and supporting tests #53035

Conversation

sts-ryan-holton
Copy link
Contributor

Hi 👋,

In my Laravel projects where I utilise the Str::contains() method, I often find that I need the inverse functionality of this. Whilst I can just prepend with ! to get the inverse, readability in the method name can make better sense.

This PR introduces a new Str::doesntContain() method that internally utilises the same functionality as contains except does the inversing for the end user whilst retaining a readable function name! Simple but effective!

@NickSdot
Copy link
Contributor

NickSdot commented Oct 5, 2024

Related: #40396, #52969

@sts-ryan-holton
Copy link
Contributor Author

Related: #40396, #52969

Worth another stab! :)

@taylorotwell taylorotwell merged commit 5106bd5 into laravel:11.x Oct 6, 2024
33 checks passed
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