hd-utils
Version:
A handy utils for modern JS developers
7 lines (6 loc) • 301 B
TypeScript
/**
* @description function which takes a string of characters and adds a "padding" string of your choice to the end (or right) of the passed string.
* @example
* padEnd("123", 5, '0') // '12300'
*/
export default function padEnd(input: string, targetLength: number, padString?: string): string;