Categories > TinyButStrong general >

Upgrade upperw function

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Martin
Date: 2014-10-01
Time: 15:21

Upgrade upperw function

Hi !!! How are you Skroll29.

I was using the operator :
to make first letter of each word, transform in upper case and work well, only if the word are in small case.

Perhaps for next version, you can include this trick at ucwords function.

case 18: $CurrVal = ($Loc->OpeUtf8) ? mb_convert_case($CurrVal, MB_CASE_TITLE, 'UTF-8') : ucwords(strtolower($CurrVal)); break;

It just a comment, Thanks a Lot

$foo = 'hello world!';
$foo = ucwords($foo);             // Hello World!

$bar = 'HELLO WORLD!';
$bar = ucwords($bar);             // HELLO WORLD!
$bar = ucwords(strtolower($bar)); // Hello World!
By: Skrol29
Date: 2014-10-01
Time: 21:48

Re: Upgrade upperw function

Hi Martin,

It is noticed for the next version.