Skip to content

Kirby 6.0.0

Str::toType()

Convert the string to the given type

Str::toType(mixed $string, mixed $type)

Parameters

Name Type Default Description
$stringrequired mixed no default value
$typerequired mixed no default value Type name or a value of the target type

Parent class

Kirby\Toolkit\Str