Skip to content

Kirby 4.4.1

Str::split()

Better alternative for explode() It takes care of removing empty values and it has a built-in way to skip values which are too short.

Str::split(array|string|null $string, string $separator = ',', int $length = 1): array

Parameters

Name Type Default Description
$string * array|string|null The string to split
$separator string ',' The string to split by
$length int 1 The min length of values.

Return type

array

Parent class

Kirby\Toolkit\Str