Reference

Guide

Str::position()

Returns the position of a needle in a string if it can be found

Str::position(string $string, string $needle, bool $caseInsensitive = false): int|bool

Parameters

Name Type Default Description
$string string
$needle string
$caseInsensitive bool false

Return type

int|bool

Source code

kirby/src/Toolkit/Str.php#L507