mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-09-02 01:22:37 +02:00
Add contains()
This commit is contained in:
18
README.md
18
README.md
@@ -24,6 +24,8 @@ A PHP library with a variety of string manipulation functions with multibyte sup
|
||||
* [endsWith](#endswith)
|
||||
* [toSpaces](#tospaces)
|
||||
* [toTabs](#totabs)
|
||||
* [slugify](#slugify)
|
||||
* [contains](#contains)
|
||||
* [Tests](#tests)
|
||||
* [License](#license)
|
||||
|
||||
@@ -303,12 +305,22 @@ dashes. The string is also converted to lowercase.
|
||||
S::slugify('Using strings like fòô bàř') // 'using-strings-like-foo-bar'
|
||||
```
|
||||
|
||||
##### contains
|
||||
|
||||
S::contains(string $haystack, string $needle [, string $encoding ])
|
||||
|
||||
Returns true if $haystack contains $needle, false otherwise.
|
||||
|
||||
```php
|
||||
S::contains('Ο συγγραφέας είπε', 'συγγραφέας', 'UTF-8') // true
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
**contains**
|
||||
|
||||
**between**
|
||||
|
||||
**surround**
|
||||
|
||||
**replace** => substr_replace
|
||||
|
||||
**insert**
|
||||
@@ -337,6 +349,8 @@ S::slugify('Using strings like fòô bàř') // 'using-strings-like-foo-bar'
|
||||
|
||||
**isJson**
|
||||
|
||||
**isMultibyte**
|
||||
|
||||
## Tests
|
||||
|
||||
[](https://travis-ci.org/danielstjules/Stringy)
|
||||
|
Reference in New Issue
Block a user