640 B
640 B
Home > @apextoaster/js-utils > trim
trim() function
Return the start of val
, up to max
characters. If val
is longer than max
and there is room, suffix with tail
.
Signature:
export declare function trim(val: string, max: number, tail?: string): string;
Parameters
Parameter | Type | Description |
---|---|---|
val | string | |
max | number | |
tail | string |
Returns:
string