2020-03-29 14:10:40 +00:00
|
|
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
|
|
|
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [leftPad](./js-utils.leftpad.md)
|
|
|
|
|
|
|
|
## leftPad() function
|
|
|
|
|
2021-08-08 20:11:23 +00:00
|
|
|
Prefix `val` with `fill` until it is at least `min` characters.
|
|
|
|
|
2020-03-29 14:10:40 +00:00
|
|
|
<b>Signature:</b>
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
export declare function leftPad(val: string, min?: number, fill?: string): string;
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --- | --- | --- |
|
2020-06-29 23:23:16 +00:00
|
|
|
| val | string | |
|
|
|
|
| min | number | |
|
|
|
|
| fill | string | |
|
2020-03-29 14:10:40 +00:00
|
|
|
|
|
|
|
<b>Returns:</b>
|
|
|
|
|
2020-06-29 23:23:16 +00:00
|
|
|
string
|
2020-03-29 14:10:40 +00:00
|
|
|
|