Re: [VOTE] str_icontains
Hi
Am 2025-07-01 09:01, schrieb Adam Cable:
Thank you for your RFC. While I initially said “seems easy enough” in the PR and I also believe that making the function ASCII-only for consistency, I ultimately decided to vote against the RFC.
My main reason is that I do not like how this function is added in a standalone fashion without a bigger picture. As mentioned in the PR, str_starts_with() and str_ends_with() are obvious companion functions.
And ultimately calling strtolower() on both parameters before passing them to str_contains() is quite explicit in what it does (and would also resolve the Unicode vs ASCII confusion that others expressed). Alternatively stripos() would also work.
Best regards
Tim Düsterhus
Thread (9 messages)