Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[11.x] Add $ignoreCase option to Str::is #53981

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

stevebauman
Copy link
Contributor

Description

This PR adds an $ignoreCase boolean parameter in the Str::is method, allowing developers to disable strict-case comparison, similarly to the Str::contains method.

Usage

Str::is('Admin', 'admin', true); // true

Str::is('*.jpg', 'photo.JPG', true); // true

Str::is('SKU123*', 'sku12345', true); // true

Str::is('prd-001*', 'PRD-001-XYZ', true); // true

Str::is('JOHN.DOE@example.com', 'john.doe@example.com', true); // true

@taylorotwell taylorotwell merged commit b6c9169 into laravel:11.x Dec 19, 2024
30 of 38 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants