| hide_title | true |
|---|---|
| custom_edit_url | |
| pagination_prev | |
| pagination_next |
Home > @rushstack/node-core-library > Text > truncateWithEllipsis
If the string is longer than maximumLength characters, truncate it to that length using "..." to indicate the truncation.
Signature:
static truncateWithEllipsis(s: string, maximumLength: number): string;|
Parameter |
Type |
Description |
|---|---|---|
|
s |
string | |
|
maximumLength |
number |
Returns:
string
For example truncateWithEllipsis('1234578', 5) would produce '12...'.