Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function substringEllipsis($string, $start, $length, $lenience = 5, $overflowText = '...')
- {
- $sub = substr($string, $start, $length);
- return strlen($string) - strlen($sub) <= $lenience ? $string : $sub.$overflowText;
- }
Add Comment
Please, Sign In to add comment