For those voting against adding these functions, can you clarify why?
Do you dislike how they are named, or do you not see the need for the
case insensitive versions, or is there an issue with the implementation?
I believe that star_with/end_with is useful, but not in this form.
The standard library has 98 string functions with different naming styles.
Adding 4 more (8 for mb_) functions for actually two(one?) tasks is redundant.
I think that more discussion is needed.
My preferred variants:
- One function
str_contains( $haystack, $needle, [CASE_INSENSITIVE|FROM_BEGIN|FROM_END|MULTI_BYTE] = 0, [$encoding] = utf8 )
str_starts_with(...see above, but without FROM_BEGIN|FROM_END) str_ends_with(...see above, but without FROM_BEGIN|FROM_END)