in src/str/introspect_l.php [71:90]
function contains_l(
Locale\Locale $locale,
string $haystack,
string $needle,
int $offset = 0,
)[]: bool {
if ($needle === '') {
if ($offset === 0) {
return true;
}
$length = length_l($locale, $haystack);
if ($offset > $length || $offset < -$length) {
throw new \InvalidArgumentException(
format('Offset %d out of bounds for length %d', $offset, $length)
);
}
return true;
}
return search_l($locale, $haystack, $needle, $offset) !== null;
}