function pad(string, length) {
		var remaining = length - string.length;

		for (var i = 0; i < remaining; i++) {
			string = " " + string;
		}

		return string;
	}
Pads a string with spaces on the left to match a certain length.

@param {string} string
@param {number} length
@returns {string} padded string