1
0
Fork 0
js-utils/docs/api/js-utils.trim.md

27 lines
640 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [trim](./js-utils.trim.md)
## trim() function
Return the start of `val`<!-- -->, up to `max` characters. If `val` is longer than `max` and there is room, suffix with `tail`<!-- -->.
<b>Signature:</b>
```typescript
export declare function trim(val: string, max: number, tail?: string): string;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| val | string | |
| max | number | |
| tail | string | |
<b>Returns:</b>
string