truncate() public static method
Truncates a string to the number of characters specified.
public static string truncate ( $string, $length, $suffix = '...', $encoding = null, $asHtml = false )$string string
The string to truncate. $length integer
How many characters from original string to include into truncated string. $suffix string
String to append to the end of truncated string. $encoding string
The charset to use, defaults to charset currently used by application. $asHtml boo