public static function wordDeleteWhole($string, $length, $end = '...')
{
    if (strlen($string) < $length || strlen($string) == $length) {
        return $string;
    } else {
        preg_match('/(.{' . $length . '}.*?)\\b/', $string, $matches);
        return rtrim($matches[1]) . $end;
    }
}