Skip to content

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

Merged
taylorotwell merged 4 commits intolaravel:11.xfrom
stevebauman:str-is-ignore-case
Dec 19, 2024
Merged

[11.x] Add $ignoreCase option to Str::is#53981
taylorotwell merged 4 commits intolaravel:11.xfrom
stevebauman:str-is-ignore-case

Conversation

@stevebauman
Copy link
Copy Markdown
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

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.

2 participants