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 | stringornull |
no default value |
| $needlerequired | string |
no default value |
| $caseInsensitive | bool |
false
|
Return types
intorfalse
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\InvalidArgumentException |
for empty $needle |