public function get_short_filename($str, $maxlength) {
        if (core_text::strlen($str) >= $maxlength) {
            return trim(core_text::substr($str, 0, $maxlength)).'...';
        } else {
            return $str;
        }
    }
public function get_short_filename($str, $maxlength) {
        if (core_text::strlen($str) >= $maxlength) {
            return trim(core_text::substr($str, 0, $maxlength)).'...';
        } else {
            return $str;
        }
    }
public function get_short_filename ( $ str , $ maxlength ) { if ( core_text :: strlen ( $ str ) >= $ maxlength ) { return trim ( core_text :: substr ( $ str , 0 , $ maxlength ) ) . '...' ; } else { return $ str ; } }
Create a shorten filename

@param string $str filename
@param int $maxlength max file name length
@return string short filename
Create a shorten filename