mb_convert_case does not convert upper case letters
Description
The following code:
<?php
echo mb_convert_case('THIS IS ALL CAPS', MB_CASE_TITLE);
Resulted in this output:
THIS IS ALL CAPS
But I expected this output instead:
This Is All Caps
This does follow the behavior of the non-mb function ucwords(), however does the name of the constant not imply that this should convert upper case letters to lower?
PHP Version
7.4
Operating System
Ubuntu 20
Title-case means first letter of a word is upper-case, following letters are lower-case. As such, the function with MB_CASE_TITLE does what it should. Are you looking for MB_CASE_LOWER (or mb_strtolower())?
Title-case means first letter of a word is upper-case, following letters are lower-case. As such, the function with
MB_CASE_TITLEdoes what it should. Are you looking forMB_CASE_LOWER(ormb_strtolower())?
I just reread my original ticket and updated it. I had it backwards, expected vs actual output. Sorry about that!
Yeah, but see https://3v4l.org/KW2cu. What am I missing?
You're not. I think I may be the victim of a repository update. Please disregard.