Remove truncate helper and use css instead

This commit is contained in:
Frederic Guillot
2015-06-15 20:42:41 -04:00
parent b96e6f82c8
commit 56d5b96fc0
4 changed files with 11 additions and 40 deletions

View File

@@ -41,25 +41,6 @@ class Text extends \Core\Base
return round(pow(1024, $base - floor($base)), $precision).$suffixes[(int)floor($base)];
}
/**
* Truncate a long text
*
* @param string $value Text
* @param integer $max_length Max Length
* @param string $end Text end
* @return string
*/
public function truncate($value, $max_length = 85, $end = '[...]')
{
$length = mb_strlen($value);
if ($length > $max_length) {
return mb_substr($value, 0, $max_length).' '.$end;
}
return $value;
}
/**
* Return true if needle is contained in the haystack
*