@monstermann/fn
Version:
A utility library for TypeScript.
20 lines • 509 B
TypeScript
//#region src/string/padStart.d.ts
/**
* `padStart(target, length, fill)`
*
* Pads `target` string from the start with `fill` string until the result reaches the specified `length`.
*
* ```ts
* padStart("hello", 10, " "); // " hello"
* ```
*
* ```ts
* pipe("hello", padStart(10, " ")); // " hello"
* ```
*/
declare const padStart: {
(length: number, fill: string): (target: string) => string;
(target: string, length: number, fill: string): string;
};
//#endregion
export { padStart };