[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [leftPad](./js-utils.leftpad.md)
## leftPad() function
Prefix `val` with `fill` until it is at least `min` characters.
Signature:
```typescript
export declare function leftPad(val: string, min?: number, fill?: string): string;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| val | string | |
| min | number | (Optional) |
| fill | string | (Optional) |
Returns:
string