Function shorten_subject
Shorten a subject + internationalization concerns.
- shortens a subject so that it is either shorter than length, or that length plus an ellipsis.
- respects internationalization characters and entities as one character.
- avoids trailing entities.
- returns the shortened string.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs.php
string |
$subject |
The subject |
integer |
$len |
How many characters to limit it to |
string
|
The shortened subject - either the entire subject (if it's <= $len) or the subject shortened to $len characters with "..." appended |