Str::position()
Returns the position of a needle in a string if it can be found
Str::position(string|null $string, string $needle, bool $caseInsensitive = false): int|false
Parameters
Name | Type | Default |
---|---|---|
$string | string ornull |
no default value |
$needlerequired | string |
no default value |
$caseInsensitive | bool |
false
|
Return types
int
orfalse
Exceptions
Type | Description |
---|---|
Kirby\Exception\InvalidArgumentException |
for empty $needle |