Remove truncate helper and use css instead
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user