27 lines
657 B
Markdown
27 lines
657 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [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 | <i>(Optional)</i> |
|
|
|
|
<b>Returns:</b>
|
|
|
|
string
|
|
|