THE TRUNCENATOR
| author | Barnaby Walters |
|---|
truncate(string $string, int $length, string $uri, int $urilen, bool $parens, string $ellipsis, $hastags) : string
Takes a string (tweet-like note) and some config params, produces a truncated version to spec.
| todo | A lot of this functionality is not properly implemented |
|---|
stringThe string to be truncated
intThe maximum length of the output
stringThe canonical URI of the post, to be added to the end
intTreat any URLs as if they were this length
boolIf trucation is not required, surround the canon. link with parens (())
stringThe string to append in the case of truncation
stringThe truncated string