Esempio n. 1
0
function ellipsize_html($string, $maxlen, $postfix = '…')
{
    $output = new HtmlCutString($string, $maxlen, $postfix);
    return $output->cut();
}
Esempio n. 2
0
/**
 * @param $string
 * @param $limit
 * @return string
 */
function cut_html_string($string, $limit)
{
    $output = new HtmlCutString($string, $limit);
    return $output->cut();
}
Esempio n. 3
0
 public static function cutHtmlString($str, $len, $more = '')
 {
     $output = new HtmlCutString($str, $len);
     $result = $output->cut();
     if ($more) {
         $result .= " " . $more;
     }
     return $result;
 }