Description
Splits given string according to given separator(s).
Note
Arma 3: See splitString.
Syntax
[stringToSplit, separators, byWord] call BIS_fnc_splitString
Parameters:
stringToSplit: Stringseparators: String - (Optional, default "") by default each letter is a separator. If byWord is set to true, the separator will be treated as whole wordbyWord: Boolean - (Optional, default false) by default uses splitString behaviour e.g. each letter is a separator. If set to true, the separator will be treated as whole word
Examples
Example 1
["this is a test", " "] call BIS_fnc_splitString; // returns ["this", "is", "a", "test"]
Example 2
["this is a test", "st"] call BIS_fnc_splitString; // returns ["hi"," i"," a ","e"]
Example 3
["this is a test", "is"] call BIS_fnc_splitString; // returns ["th"," "," a te","t"]
Example 4
["this is a test", "is", true] call BIS_fnc_splitString; // returns ["th"," "," a test"]