Pixel-Composer/scripts/string_formatting/string_formatting.gml
2022-11-14 09:16:15 +07:00

10 lines
178 B
Plaintext

function string_lead_zero(val, digit) {
var len = string_length(string(val));
var zer = digit - len;
var ss = "";
repeat(zer) ss += "0";
ss += string(val);
return ss;
}