mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-09-01 01:01:46 +02:00
Bring back StaticStringy as a __callStatic wrapper
This commit is contained in:
14
README.md
14
README.md
@@ -94,6 +94,7 @@ s('string')->toTitleCase()->ensureRight('y') == 'Stringy'
|
||||
* [underscored](#underscored)
|
||||
* [upperCamelize](#uppercamelize)
|
||||
* [upperCaseFirst](#uppercasefirst)
|
||||
* [StaticStringy](#staticstringy)
|
||||
* [Extensions](#extensions)
|
||||
* [Tests](#tests)
|
||||
* [License](#license)
|
||||
@@ -947,6 +948,19 @@ Converts the first character of the supplied string to upper case.
|
||||
s('σ foo')->upperCaseFirst(); // 'Σ foo'
|
||||
```
|
||||
|
||||
## StaticStringy
|
||||
|
||||
A static wrapper exists for Stringy methods. All the methods list under
|
||||
"Instance methods" are available. For StaticStringy method, the optional
|
||||
encoding is expected to be the last argument. The result is not cast, so
|
||||
the return value may be of type Stringy, integer, boolean, etc.
|
||||
|
||||
```php
|
||||
// Translates to Stringy::create('fòôbàř', 'UTF-8')->slice(0, 3);
|
||||
StaticStringy::slice('fòôbàř', 0, 3, 'UTF-8');
|
||||
```
|
||||
|
||||
|
||||
## Extensions
|
||||
|
||||
The following is a list of libraries that extend Stringy:
|
||||
|
Reference in New Issue
Block a user