photo/helpers.php

8 lines
180 B
PHP

<?php
if (! function_exists('stringtrim')) {
function stringtrim(string $string,int $chrs=6)
{
return sprintf('%s...%s',substr($string,0,$chrs),substr($string,-1*$chrs));
}
}