1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-09-02 01:22:37 +02:00

Added $caseSensitive to contains()

This commit is contained in:
Daniel St. Jules
2013-09-14 01:32:37 -04:00
parent 49e1c5ad2a
commit ea20aebc91
6 changed files with 47 additions and 26 deletions

View File

@@ -167,11 +167,13 @@ S::collapseWhitespace(' Ο συγγραφέας '); // 'Ο συγγρα
#### contains
$stringy->contains(string $needle)
$stringy->contains(string $needle [, boolean $caseSensitive = true ])
S::contains(string $haystack, string $needle [, string $encoding ])
S::contains(string $haystack, string $needle [, boolean $caseSensitive = true [, string $encoding ]])
Returns true if the string contains $needle, false otherwise.
Returns true if the string contains $needle, false otherwise. By default,
the comparison is case-sensitive, but can be made insensitive
by setting $caseSensitive to false.
```php
S::create('Ο συγγραφέας είπε', 'UTF-8')->contains('συγγραφέας');