diff --git a/index.html b/index.html index c8dddfd..cfa9699 100644 --- a/index.html +++ b/index.html @@ -4,43 +4,31 @@
A PHP string manipulation library with multibyte support
+ + + + +A PHP library with a variety of string manipulation functions with multibyte support. Offers both OO method chaining and a procedural-style static wrapper. Compatible with PHP 5.3+. Inspired by underscore.string.js.
@@ -695,14 +683,15 @@ exceeding the desired length.$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.S::create('Using strings like fòô bàř')->slugify();
S::slugify('Using strings like fòô bàř'); // 'using-strings-like-foo-bar'
@@ -949,11 +938,11 @@ and underscores, and removes spaces, dashes, underscores.
Released under the MIT License - see LICENSE.txt
for details.