Skip to content

Kirby 5.0.0

Str::startsWith()

Checks if a string starts with the passed needle

Str::startsWith(string|null $string, string $needle, bool $caseInsensitive = false): bool

Parameters

Name Type Default
$string stringornull no default value
$needlerequired string no default value
$caseInsensitive bool false

Return type

bool

Parent class

Kirby\Toolkit\Str