mirror of
https://github.com/danielstjules/Stringy.git
synced 2025-09-01 09:03:03 +02:00
Added $caseSensitive to count()
This commit is contained in:
@@ -184,12 +184,13 @@ S::contains('Ο συγγραφέας είπε', 'συγγραφέας', 'UTF-8')
|
||||
|
||||
#### count
|
||||
|
||||
$stringy->count(string $substring)
|
||||
$stringy->count(string $substring [, boolean $caseSensitive = true ])
|
||||
|
||||
S::count(string $str, string $substring [, string $encoding ])
|
||||
S::count(string $str, string $substring [, boolean $caseSensitive = true [, string $encoding ]])
|
||||
|
||||
Returns the number of occurrences of $substring in the given string. An alias for
|
||||
mb_substr_count()
|
||||
Returns the number of occurrences of $substring in the given string.
|
||||
By default, the comparison is case-sensitive, but can be made insensitive
|
||||
by setting $caseSensitive to false.
|
||||
|
||||
```php
|
||||
S::create('Ο συγγραφέας είπε', 'UTF-8')->count('α');
|
||||
|
Reference in New Issue
Block a user