Function format
Formats the given string by replacing placeholders with the values provided.
Parameters summary
string |
$str |
The string to format. |
array |
$args = array() |
<p>An array of replacements 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:</p>
<ul>
<li>:key: Replace as is. Use this for text that has already been sanitized.</li>
<li>!key or {key}: Sanitize using the <code>ICanBoogie\escape()</code> function.</li>
<li>%key: Sanitize using the <code>ICanBoogie\escape()</code> function and wrap inside a "EM" markup.</li>
</ul>
<p>Numeric indexes can also be used e.g "\2" or "{2}" are replaced by the value of the index
"2".</p> |
Return value summary