a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Shared / padString
padString(
input,targetLength,padChar):string
Pads a string to a specified length with a given character.
• input: string
The input string to be padded.
• targetLength: number
The target length of the resulting string.
• padChar: string = ' '
The character to pad the string with. Defaults to a space character.
string
The padded string.
const result = padString("Hello", 10, "*");
console.log(result); // "Hello*****"