Str::short()
Shortens a string and adds an ellipsis if the string is too long
Str::short(string $string = null, int $length = 0, string $appendix = '…'): string|null
Parameters
Name | Type | Default | Description |
---|---|---|---|
$string |
string |
null |
The string to be shortened |
$length |
int |
0 |
The final number of characters the |
$appendix |
string |
'…' |
The element, which should be added if the |
Return type
string|null