abbr
Abbreviate word.
def abbr(
S: str,
max: int,
ellipsis: str | bool = '...'
) - > str
Abbreviate word.
Parameters
| Name | Type | Description |
|---|---|---|
| S | str | The input string to be shortened. |
| max | int | The maximum allowed length of the resulting string, including the ellipsis. |
| ellipsis | `str | bool` = '...' |
Returns
| Type | Description |
|---|---|
str | The abbreviated string if the length exceeds the maximum, otherwise the original string or a placeholder for null values. |