18 lines
274 B
PHP
18 lines
274 B
PHP
<?php
|
|
|
|
namespace rosavox\helpers\string_;
|
|
|
|
|
|
/**
|
|
*/
|
|
function coin(string $template, array $arguments) : string
|
|
{
|
|
$result = $template;
|
|
foreach ($arguments as $key => $value)
|
|
{
|
|
$result = \str_replace(\sprintf('{{%s}}', $key), $value, $result);
|
|
}
|
|
return $result;
|
|
}
|
|
|
|
?>
|