R3vo
"test" select [0, 4]; // 0.0007 ms
["test", 0, 4] call BIS_fnc_trimString; // 0.013 ms
The first method is about 18 times faster.
Results appear below as you type; use the arrow keys to move through them.
Get a substring out of the string.
Note
Arma 3: Use select instead.
[someText, beginning, length] call BIS_fnc_trimString
Parameters:
someText: String - source stringbeginning: Number (Optional, default 0) - start index; indexing starts at 0length: Number (Optional, default end of string) - end index. A negative number means X chars from the string endReturns: String
["dreaded_is_the_man", 0, 6] call BIS_fnc_trimString; // will return "dreaded"
["dreaded_is_the_man", 15] call BIS_fnc_trimString; // will return "man"
["dreaded_is_the_man"] call BIS_fnc_trimString; // will return "dreaded_is_the_man"
"test" select [0, 4]; // 0.0007 ms
["test", 0, 4] call BIS_fnc_trimString; // 0.013 ms
The first method is about 18 times faster.