VuFind API Documentation

Truncate extends AbstractHelper
in package

Truncate view helper

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

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

Return values
string

Search results