swc/crates/swc_bundler/tests/.cache/deno/f090dfcb21d26c0423abb9d247c53bdb2c674be1.ts

19 lines
469 B
TypeScript
Raw Normal View History

// Loaded from https://deno.land/x/cliffy@v0.12.1/packages/flags/lib/utils.ts
/**
* Fill string with given char until the string has a specified length.
*
* @param count The length until the string will be filled.
* @param str The string to fill.
* @param char The char to fill the string with.
*/
export function fill( count: number, str: string = '', char: string = ' ' ) {
while ( str.length < count ) {
str += char;
}
return str;
}