Truncates the string to a given length, adding elipses (if needed).
final public static Truncate ( $strText, integer $intMaxLength, bololean $blnHtmlEntities = true ) : string | ||
$intMaxLength | integer | the maximum possible length of the string to return (including length of the elipse) |
$blnHtmlEntities | bololean | whether or not to escape the text with htmlentities first |
return | string | the full string or the truncated string with eplise |