Pad Integer String GML Script

Very small script to pad a string with zeroes.

Example: 1/1/2018 -> 01/01/2018.

///pad_integer_string(int, total)
///@param int
///@param total

var int = argument0;
var total = argument1;

return string_replace(string_format(int, total, 0), " ", "0");

 

Leave a Reply

Your email address will not be published. Required fields are marked *