defines battalion info, integrates FBCB2 freqs and callsigns
This commit is contained in:
20
functions/util/fn_padString.sqf
Normal file
20
functions/util/fn_padString.sqf
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
Reference in New Issue
Block a user