mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-09-01 17:12:42 +02:00
function isSerialized(), with tests
This commit is contained in:
14
README.md
14
README.md
@@ -25,6 +25,7 @@ A PHP library with a variety of string manipulation functions with multibyte sup
|
||||
* [isBlank](#isblank)
|
||||
* [isHexadecimal](#ishexadecimal)
|
||||
* [isLowerCase](#islowercase)
|
||||
* [isSerialized](#isserialized)
|
||||
* [isUpperCase](#isuppercase)
|
||||
* [last](#last)
|
||||
* [length](#length)
|
||||
@@ -364,6 +365,19 @@ S::create('fòô bàř', 'UTF-8')->isLowerCase();
|
||||
S::isLowerCase('fòô bàř', 'UTF-8'); // true
|
||||
```
|
||||
|
||||
#### isSerialized
|
||||
|
||||
$stringy->isSerialized()
|
||||
|
||||
S::isSerialized(string $str [, string $encoding ])
|
||||
|
||||
Returns true if the string is serialized, false otherwise.
|
||||
|
||||
```php
|
||||
S::create('a:1:{s:3:"foo";s:3:"bar";}',, 'UTF-8')->isSerialized();
|
||||
S::isSerialized('a:1:{s:3:"foo";s:3:"bar";}', 'UTF-8'); // true
|
||||
```
|
||||
|
||||
#### isUpperCase
|
||||
|
||||
$stringy->isUpperCase()
|
||||
|
Reference in New Issue
Block a user