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

27 lines
657 B
Markdown
Raw Permalink Normal View History

2020-03-29 14:10:40 +00:00
<!-- 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
2021-08-08 20:11:23 +00:00
Return the start of `val`<!-- -->, up to `max` characters. If `val` is longer than `max` and there is room, suffix with `tail`<!-- -->.
2020-03-29 14:10:40 +00:00
<b>Signature:</b>
```typescript
export declare function trim(val: string, max: number, tail?: string): string;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| val | string | |
| max | number | |
2022-10-08 19:52:35 +00:00
| tail | string | <i>(Optional)</i> |
2020-03-29 14:10:40 +00:00
<b>Returns:</b>
string
2020-03-29 14:10:40 +00:00