Reference

Guide

Str::before()

Returns the beginning of a string before the given character

Str::before(string $string, string $needle, bool $caseInsensitive = false): string

Parameters

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

Return type

string

Source code

kirby/src/Toolkit/Str.php#L193