Trim text to a given length.
public static trimText ( string $str, integer $desiredLength, boolean $hellip = true, integer $cutOffCap = 10 ) : string | ||
$str | string | String to trim |
$desiredLength | integer | Target string length |
$hellip | boolean | Add dots when the string is too long |
$cutOffCap | integer | Maximum difference between string length when removing words |
리턴 | string | Trimmed string |