mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
18 lines
341 B
Plaintext
18 lines
341 B
Plaintext
//fnc_textPad.sqf
|
|
#include "script_component.hpp"
|
|
PARAMS_3(_str,_pad,_length);
|
|
|
|
_strArray = toArray _str;
|
|
_padStr = "";
|
|
if(_length > (count _strArray)) then {
|
|
_dif = _length - (count _strArray);
|
|
|
|
for "_i" from 1 to _dif do {
|
|
_padStr = _padStr + _pad;
|
|
};
|
|
_padStr = _padStr + _str;
|
|
} else {
|
|
_padStr = _str;
|
|
};
|
|
|
|
_padStr |