By using a function to perform that:
recent_comment_text_more($comment_content)
that function would look like (in case you’re using PHP, part of your code looks from another language):
function recent_comment_text_more($comment_content, $more_href) {
if (strlen($comment_content) > 180) {
$comment_content = substr($comment_content, 0, 177) . sprintf('<a href="https://wordpress.stackexchange.com/questions/8656/%s">... (more)</a>', $more_href);
}
return $comment_content;
}
Good luck!
Multibyte charset safe variant
As pointed out in a comment, e.g. for UTF-8, see mb_internal_encoding() for specifying the encoding to use:
function recent_comment_text_more($comment_content, $more_href) {
if (mb_strlen($comment_content) > 180) {
$comment_content = mb_substr($comment_content, 0, 177) . sprintf('<a href="https://wordpress.stackexchange.com/questions/8656/%s">... (more)</a>', $more_href);
}
return $comment_content;
}