1
0
www.mikescher.com/www/extern/egh/Utils.php

19 lines
328 B
PHP
Raw Normal View History

2018-01-21 15:29:01 +01:00
<?php
class Utils
{
public static function sharpFormat($str, $args)
{
foreach ($args as $key => $val)
{
$str = str_replace('{'.$key.'}', $val, $str);
}
return $str;
}
public static function startsWith($haystack, $needle)
{
$length = strlen($needle);
return (substr($haystack, 0, $length) === $needle);
}
}