API Documentation (v0.9.0-alpha)

Avolutions\Util\StringHelper

Provides helper methods to handle strings.

Methods

Method Visibility Description
interpolate() public Replaces placeholders in a string with given values.

Method Details

interpolate()

Replaces placeholders in a string with given values.

public static interpolate(string $string[, array<string|int, mixed> $params = [] ]) : string
Parameters

string $string
String with placeholders.

array<string|int, mixed> $params (optional)
An array with values to replace the placeholders with.

Return values
string Replaces placeholders in a string with given values.