Functions:truncate

Truncates a string at the given length

truncate(string $value, [ int $length = 80, [ string $etc = '...', [ bool $break = false, [ bool $middle = false ]]]])


 * value : text to truncate
 * length : the maximum length for the string
 * etc : the characters that are added to show that the string was cut off
 * break : if true, the string will be cut off at the exact length, instead of cutting at the nearest space
 * middle : if true, the string will contain the beginning and the end, and the extra characters will be removed from the middle

Example: Output: this text is r... is will you? 30