From 95d85710c2a393c2e4479ad19f46149b03364168 Mon Sep 17 00:00:00 2001
From: "Daniel St. Jules"
"require": {
- "danielstjules/stringy": "~2.0"
+ "danielstjules/stringy": "~2.1"
}
Then, after running composer update
or php composer.phar update
, you can
@@ -239,6 +240,20 @@ you can take advantage of an even simpler API as seen below:
All methods listed under "Instance methods" are available as part of a static +wrapper. For StaticStringy methods, the optional encoding is expected to be the +last argument. The return value is not cast, and may thus be of type Stringy, +integer, boolean, etc.
+ +use Stringy\StaticStringy as S;
+
+// Translates to Stringy::create('fòôbàř', 'UTF-8')->slice(0, 3);
+// Returns a Stringy object with the string "fòô"
+S::slice('fòôbàř', 0, 3, 'UTF-8');