Arma 3 Scripting

Function in Strings

BIS_fnc_splitString

Also available as Markdown and JSON, or read the original wiki page.

Description

Splits given string according to given separator(s).

Note

Arma 3: See splitString.

Syntax

[stringToSplit, separators, byWord] call BIS_fnc_splitString

Parameters:

Returns: Array of Strings

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"]

See also

splitString · toArray · toString