mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-09-01 09:03:03 +02:00
Fix and merge branch 'isJson'
This commit is contained in:
14
README.md
14
README.md
@@ -24,6 +24,7 @@ A PHP library with a variety of string manipulation functions with multibyte sup
|
||||
* [isAlphanumeric](#isalphanumeric)
|
||||
* [isBlank](#isblank)
|
||||
* [isHexadecimal](#ishexadecimal)
|
||||
* [isJson](#isjson)
|
||||
* [isLowerCase](#islowercase)
|
||||
* [isSerialized](#isserialized)
|
||||
* [isUpperCase](#isuppercase)
|
||||
@@ -352,6 +353,19 @@ S::create('A102F')->isHexadecimal();
|
||||
S::isHexadecimal('A102F'); // true
|
||||
```
|
||||
|
||||
#### isJson
|
||||
|
||||
$stringy->isJson()
|
||||
|
||||
S::isJson(string $str [, string $encoding ])
|
||||
|
||||
Returns true if the string is JSON, false otherwise.
|
||||
|
||||
```php
|
||||
S::create('{"foo":"bar"}')->isJson();
|
||||
S::isJson('{"foo":"bar"}'); // true
|
||||
```
|
||||
|
||||
#### isLowerCase
|
||||
|
||||
$stringy->isLowerCase()
|
||||
|
Reference in New Issue
Block a user