{"name":"BIS_fnc_trimString","operator":null,"title":"BIS fnc trimString","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_trimString","revid":340879,"updated":"2023-05-13T21:38:38Z","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":"Get a substring out of the string.\n\n> [!NOTE]\n> **Arma 3:** Use select instead.","syntaxes":[{"syntax":"[someText, beginning, length] call BIS_fnc_trimString","since":null,"effect":null,"exec":null,"params":[{"name":"someText","type":"String","optional":false,"default":null,"description":"source string","types":["String"],"since":null,"text":"someText: String - source string"},{"name":"beginning","type":"Number","optional":true,"default":"0","description":"start index; indexing starts at 0","types":["Number"],"since":null,"text":"beginning: Number (Optional, default 0) - start index; indexing starts at 0"},{"name":"length","type":"Number","optional":true,"default":"end of string","description":"end index. A negative number means X chars *from the string end*","types":["Number"],"since":null,"text":"length: Number (Optional, default end of string) - end index. A negative number means X chars *from the string end*"}],"returns":{"type":"String","types":["String"],"description":null,"text":"String"}}],"examples":[{"text":"```sqf\n[\"dreaded_is_the_man\", 0, 6] call BIS_fnc_trimString;    // will return \"dreaded\"\n```","code":["[\"dreaded_is_the_man\", 0, 6] call BIS_fnc_trimString;\t// will return \"dreaded\""]},{"text":"```sqf\n[\"dreaded_is_the_man\", 15] call BIS_fnc_trimString;    // will return \"man\"\n```","code":["[\"dreaded_is_the_man\", 15] call BIS_fnc_trimString;\t// will return \"man\""]},{"text":"```sqf\n[\"dreaded_is_the_man\"] call BIS_fnc_trimString;        // will return \"dreaded_is_the_man\"\n```","code":["[\"dreaded_is_the_man\"] call BIS_fnc_trimString;\t\t// will return \"dreaded_is_the_man\""]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["select"],"notes":[{"user":"R3vo","date":"2017-08-24T15:45:00Z","text":"```sqf\n\"test\" select [0, 4];                        // 0.0007 ms\n[\"test\", 0, 4] call BIS_fnc_trimString;    // 0.013 ms\n```\n\nThe first method is about **18 times faster**."}],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Strings","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}