1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-09-03 01:52:43 +02:00

Renamed toTitleCase

This commit is contained in:
Daniel St. Jules
2014-09-14 09:27:46 -07:00
parent 681463de87
commit c577684e0a
6 changed files with 36 additions and 10 deletions

View File

@@ -59,6 +59,7 @@ 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)
* [toUpperCase](#touppercase)
@@ -852,6 +853,19 @@ 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 ])