CBA_fnc_split

Description

Splits a string into substrings using a separator.  Inverse of CBA_fnc_join.

Parameters

_stringString to split up [String]
_separatorString to split around.  If an empty string, “”, then split every character into a separate string [String, defaults to “”]

Returns

The split string [Array of Strings]

Examples

_result = ["FISH\Cheese\frog.sqf", "\"] call CBA_fnc_split;
_result is ["Fish", "Cheese", "frog.sqf"]

_result = ["Peas", ""] call CBA_fnc_split;
_result is ["P", "e", "a", "s"]

Author

PabstMirror

Close