#include "..\script_component.hpp"

params [
	["_text", "", [""]],
	["_padSide", "left", ["left", "right"]],
	["_padChar", " ", [" "]],
	["_padLength", 4, [4]]
];

// pad a string with a character to a certain length
if (_padSide == "left") then {
	for "_i" from 1 to _padLength - count _text do {
		_text = _padChar + _text;
	};
};
if (_padSide == "right") then {
	for "_i" from 1 to _padLength - count _text do {
		_text = _text + _padChar;
	};
};

_text
