Skip to content

Kirby 5.0.4

Str::wrap()

Wraps the string with the given string(s)

Str::wrap(string $string, string $before, string|null $after = null): string

Parameters

Name Type Default Description
$stringrequired string no default value String to wrap
$beforerequired string no default value String to prepend
$after stringornull null String to append (if different from $before)

Return type

string

Parent class

Kirby\Toolkit\Str