public static function truncate($input, $limit, $continuation = '...', $isHtml = false)
    {
        $offset = 0;
        $tags = [];
        if ($isHtml) {
            $input = static::truncateHtml($input, $limit, $offset, $tags);
        }

        $newString = static::sub($input, 0, $limit = min(static::length($input), $limit + $offset));
        $newString .= (static::length($input) > $limit ? $continuation : '');
        $newString .= count($tags = array_reverse($tags)) ? '</' . implode('></', $tags) . '>' : '';

        return $newString;
    }