You appear to be a bot. Output may be restricted
Description
Shorten a string
Usage
$the = bw_shorten( $string, $shorten );
Parameters
- $string
- ( string|null ) required –
- $shorten
- ( integer ) required – maximum allowed length
Returns
the shortened string with trailing ellipsisSource
File name: oik-bwtrace/libs/bobbforms.phpLines:
1 to 7 of 7
function bw_shorten( $string, $shorten ) { if ( strlen( $string ) > ( $shorten + 3) ) { $string = substr( $string, 0, $shorten ); $string .= "..."; } return( $string ); }View on GitHub View on Trac