paddedLeftString

Returns a copy of this string with the specified character repeatedly added to its beginning until the total length is at least the minimum length specified.

Syntax

paddedLeftString(content, charStr, num)

Returns

(string) a copy of this string with the specified character repeatedly added to its beginning until the total length is at least the minimum length specified.

Parameters

content (string)
source
charStr (string)
one character to repeat
num (integer)
minimum length

Usage

echo(paddedLeftString("123", "0", 6)); // 000123