Skip to content

Kirby 3.8.4

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(string|array|null $string, string $separator = ',', int $length = 1): array

Parameters

Name Type Default Description
$string * string|array|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