Re: Adding in a case-insensitive version of str_contains
On 29.05.2025 23:00, Kamil Tekiela wrote:
As I understand, it was a conscious decision not to add this function
when str_contains was created. The reason is that case sensitivity is
locale-dependent, and for such use cases, mbstring extension is better
[1] & [2]. Do you think that locale is a concern here, and if not,
why? Would it be a good idea to add mb_str_icontains instead?
stripos is not locale dependent, str_icontains should use the same case-folding rules and we're good and consistent. I'll vote Yes.
--
Aleksander Machniak
Kolab Groupware Developer [https://kolab.org]
Roundcube Webmail Developer [https://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
Thread (10 messages)