1
0
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:
Lucas
2013-08-23 15:19:24 +02:00
committed by Daniel St. Jules
parent 454e8e2f87
commit 0b76c56333
6 changed files with 73 additions and 0 deletions

View File

@@ -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()