{"name":"BIS_fnc_splitString","operator":null,"title":"BIS fnc splitString","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_splitString","revid":323143,"updated":"2022-06-30T17:01:12Z","groups":["Strings"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Splits given string according to given separator(s).\n\n> [!NOTE]\n> **Arma 3:** See splitString.","syntaxes":[{"syntax":"[stringToSplit, separators, byWord] call BIS_fnc_splitString","since":null,"effect":null,"exec":null,"params":[{"name":"stringToSplit","type":"String","optional":false,"default":null,"description":null,"types":["String"],"since":null,"text":"stringToSplit: String"},{"name":"separators","type":"String","optional":true,"default":"\"\"","description":"by default each letter is a separator. If *byWord* is set to true, the separator will be treated as whole word","types":["String"],"since":null,"text":"separators: String - (Optional, default \"\") by default each letter is a separator. If *byWord* is set to true, the separator will be treated as whole word"},{"name":"byWord","type":"Boolean","optional":true,"default":"false","description":"by default uses splitString behaviour e.g. each letter is a separator. If set to true, the separator will be treated as whole word","types":["Boolean"],"since":null,"text":"byWord: 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"}],"returns":{"type":"Array of Strings","types":["Array","String"],"description":null,"text":"Array of Strings"}}],"examples":[{"text":"```sqf\n[\"this is a test\", \" \"] call BIS_fnc_splitString; // returns [\"this\", \"is\", \"a\", \"test\"]\n```","code":["[\"this is a test\", \" \"] call BIS_fnc_splitString; // returns [\"this\", \"is\", \"a\", \"test\"]"]},{"text":"```sqf\n[\"this is a test\", \"st\"] call BIS_fnc_splitString; // returns [\"hi\",\" i\",\" a \",\"e\"]\n```","code":["[\"this is a test\", \"st\"] call BIS_fnc_splitString; // returns [\"hi\",\" i\",\" a \",\"e\"]"]},{"text":"```sqf\n[\"this is a test\", \"is\"] call BIS_fnc_splitString; // returns [\"th\",\" \",\" a te\",\"t\"]\n```","code":["[\"this is a test\", \"is\"] call BIS_fnc_splitString; // returns [\"th\",\" \",\" a te\",\"t\"]"]},{"text":"```sqf\n[\"this is a test\", \"is\", true] call BIS_fnc_splitString; // returns [\"th\",\" \",\" a test\"]\n```","code":["[\"this is a test\", \"is\", true] call BIS_fnc_splitString; // returns [\"th\",\" \",\" a test\"]"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["splitString","toArray","toString"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Strings","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}