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

Update readme and comments for new slugify param

This commit is contained in:
Daniel St. Jules
2013-11-27 01:14:09 -05:00
parent 8b1a91fe0c
commit 2a197244a5
3 changed files with 13 additions and 12 deletions

View File

@@ -648,14 +648,15 @@ S::shuffle('fòô bàř', 'UTF-8'); // 'àôřb òf'
#### slugify
$stringy->slugify()
$stringy->slugify([ string $replacement = '-' ])
S::slugify(string $str)
S::slugify(string $str [, string $replacement = '-' ])
Converts the string into an URL slug. This includes replacing non-ASCII
characters with their closest ASCII equivalents, removing non-alphanumeric
and non-ASCII characters, and replacing whitespace with dashes. The string
is also converted to lowercase.
and non-ASCII characters, and replacing whitespace with $replacement.
The replacement defaults to a single dash, and the string is also
converted to lowercase.
```php
S::create('Using strings like fòô bàř')->slugify();