Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Patchwork\Utf8::ucwords() is not functionally equivalent to PHP's ucwords() #38

Closed
ghost opened this issue Mar 17, 2015 · 1 comment
Closed

Comments

@ghost
Copy link

ghost commented Mar 17, 2015

PHP's ucwords implementation converts the first character to upper case.
This libraries ucwords converts the first character to upper case AND the rest of the characters to lowercase.

e.g.
$str = "MARY had A Little lamb aND sHe lOVED IT So";
echo ucwords($str); // MARY Had A Little Lamb AND SHe LOVED IT So
echo Patchwork\Utf8::ucwords($str); // Prints Mary Had A Little Lamb And She Loved It So

@nicolas-grekas
Copy link
Contributor

Closed via 4932c8d
Thanks you @martinkiva

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant