Function format
Formats the given string by replacing placeholders with the given values.
Note: Calls to this function are forwarded to Helpers::format().
Parameters summary
string |
$str |
The string to format. |
array |
$args = array() |
An array of replacement for the placeholders. Occurrences in $str
of any key in $args are replaced with the corresponding sanitized
value. The sanitization function depends on the first character of the key: -
:key : Replace as is. Use this for text that has already been
sanitized. - !key : Sanitize using the Brickrouge\escape() function. -
%key : Sanitize using the Brickrouge\escape() function and wrap inside
an EM markup. Numeric indexes can also be used e.g \2
or {2} are replaced by the value of the index 2.
|
Return value summary
string
|