<<?php echo $item->title; ?>

Replcae with this code :
<?php if(strlen($item->title) > 38) {
$item->title = substr($item->title, 0, 38).”…”;} echo $item->title; ?>

Output: It displays 38 characters only.

<?php
$text = $item->title; // using the raw value of the text
if( strlen( $text ) < 70 ) {
echo $text; // if less than 200 chars, show the entire text
} else {
$cut_text = substr( $text, 0, 70 ); //cut at 200 chars
$last_space = strrpos( $cut_text, ” ” ); //find the position of the last space in the 200 chars text
$short_text = substr( $cut_text, 0, $last_space ); //cut again at the last space
//$end_text = $short_text.”…”; // add three dots
$end_text = $short_text; // add three dots
echo $end_text;
}
?>

https://forum.sigsiu.net/community-board-for-tips-tricks/how-to-limit-a-text-to-a-certain-length-without-cutting-the-last-word/