Skip to content

Kirby 4.5.0

Str::wrap()

Wraps the string with the given string(s)

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

Parameters

Name Type Default Description
$string * string String to wrap
$before * string String to prepend
$after string|null null String to append (if different from $before)

Return type

string

Parent class

Kirby\Toolkit\Str