The function preserves words, so the result might be a bit shorter or
longer than the number of characters given. It strips all tags.
public static substr ( string $strString, integer $intNumberOfChars, string $strEllipsis = ' …' ) : string | ||
$strString | string | The string to shorten |
$intNumberOfChars | integer | The target number of characters |
$strEllipsis | string | An optional ellipsis to append to the shortened string |
return | string | The shortened string |