Skip to content

Kirby 3.7.5

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

Parameters

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