UNPKG

@n3okill/utils

Version:
12 lines (11 loc) 572 B
/** * Pads the current string with another string (repeated, if needed) so that the resulting string reaches the given length * The padding is applied form the start (left) if "start" is true or the end (right) if is false * @param str * @param str string to be padded * @param length Final size of the string * @param padString String to be added to the string * @param start Pad from the start of the string or from the end * @returns Padded string */ export declare function pad(str: string, length: number, padString?: string, start?: boolean): string;