mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 19:45:26 +00:00
10 lines
224 B
TypeScript
10 lines
224 B
TypeScript
export function left_pad(str: string, len: number) {
|
|
while (str.length < len) str = ` ${str}`;
|
|
return str;
|
|
}
|
|
|
|
export function repeat(str: string, i: number) {
|
|
let result = '';
|
|
while (i--) result += str;
|
|
return result;
|
|
} |