Truncate
extends AbstractHelper
in package
Truncate view helper
Tags
Table of Contents
- __invoke() : string
- Truncate a string
Methods
__invoke()
Truncate a string
public
__invoke(string $str, string $len[, string $append = '...' ]) : string
Parameters
- $str : string
-
the string to be truncated
- $len : string
-
how long the truncated string will be
- $append : string = '...'
-
what to add to the end of the string to indicate it's been truncated