<?php
/**
 * Project: 鱼跃CMS - Enterprise cms developed by catfish cms.
 * Producer: catfish cms [ http://www.catfish-cms.com ]
 * Author: A.J <804644245@qq.com>
 * License: http://www.yuyue-cms.com/page/agreement.html
 * Copyright: http://www.yuyue-cms.com All rights reserved.
 */
function subtext($text, $length)
{
    if(mb_strlen($text, 'utf8') > $length)
        return mb_substr($text, 0, $length, 'utf8').'...';
    return $text;
}
function suffix($text, $suffix = '')
{
    if(!empty($text)){
        $suffix = str_replace('#l','|',$suffix);
        $suffix = str_replace('#|','#l',$suffix);
        return $text . $suffix;
    }
    return $text;
}