UNPKG

super-utils-plus

Version:

A superior alternative to Lodash with improved performance, TypeScript support, and developer experience

28 lines (27 loc) 941 B
/** * Pads a string on both sides if it's shorter than the given length. * * @param string - The string to pad * @param length - The target length * @param chars - The padding characters * @returns The padded string */ export declare function pad(string: string, length?: number, chars?: string): string; /** * Pads a string on the left if it's shorter than the given length. * * @param string - The string to pad * @param length - The target length * @param chars - The padding characters * @returns The padded string */ export declare function padStart(string: string, length?: number, chars?: string): string; /** * Pads a string on the right if it's shorter than the given length. * * @param string - The string to pad * @param length - The target length * @param chars - The padding characters * @returns The padded string */ export declare function padEnd(string: string, length?: number, chars?: string): string;