Skip to content

[10.x] introduce Str::substrPos - #48421

Merged
taylorotwell merged 5 commits into
laravel:10.xfrom
amacado:feature/str-substrpos
Sep 18, 2023
Merged

[10.x] introduce Str::substrPos#48421
taylorotwell merged 5 commits into
laravel:10.xfrom
amacado:feature/str-substrpos

Conversation

@amacado

@amacado amacado commented Sep 15, 2023

Copy link
Copy Markdown
Contributor

This pull request introduces a multi-byte safe method to determine the position of the first occurrence of substring in a string. It's basically a wrapper for mb_strpos().

I've implemented the helper method as static call and in fluent style. The naming follow's other substr* methods like Str::substrCount() or Str::substrReplace().

@amacado amacado changed the title [10.x] introduce Str::substrPos [10.x] introduce Str::substrPos Sep 18, 2023
@taylorotwell
taylorotwell merged commit f0ef58d into laravel:10.x Sep 18, 2023
@amacado
amacado deleted the feature/str-substrpos branch September 18, 2023 15:12
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