diff --git a/README.md b/README.md index ec993c0..dfe83b8 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,9 @@ Tested and compatible with PHP 5.3+ and HHVM. Inspired by underscore.string.js. * [titleize](#titleize) * [toAscii](#toascii) * [toLowerCase](#tolowercase) - * [toTitleCase](#toTitleCase) * [toSpaces](#tospaces) * [toTabs](#totabs) + * [toTitleCase](#totitlecase) * [toUpperCase](#touppercase) * [trim](#trim) * [truncate](#truncate) @@ -853,19 +853,6 @@ S::create('FÒÔ BÀŘ', 'UTF-8')->toLowerCase(); S::toLowerCase('FÒÔ BÀŘ', 'UTF-8'); // 'fòô bàř' ``` -#### toTitleCase - -$stringy->toTitleCase() - -S::toTitleCase(string $str [, string $encoding ]) - -Converts the first character of each word in the string to uppercase. - -```php -S::create('fòô bàř', 'UTF-8')->toTitleCase(); -S::toTitleCase('fòô bàř', 'UTF-8'); // 'Fòô Bàř' -``` - #### toSpaces $stringy->toSpaces([ tabLength = 4 ]) @@ -895,6 +882,19 @@ S::create(' fòô bàř')->toTabs(); S::toTabs(' fòô bàř'); // ' fòô bàř' ``` +#### toTitleCase + +$stringy->toTitleCase() + +S::toTitleCase(string $str [, string $encoding ]) + +Converts the first character of each word in the string to uppercase. + +```php +S::create('fòô bàř', 'UTF-8')->toTitleCase(); +S::toTitleCase('fòô bàř', 'UTF-8'); // 'Fòô Bàř' +``` + #### toUpperCase $stringy->toUpperCase()