Arma 3 Scripting

BIS_fnc_trimString

  • Arma 3 v1.00

Function · Markdown · JSON · original wiki page

Description

Get a substring out of the string.

Note

Arma 3: Use select instead.

Syntax

[someText, beginning, length] call BIS_fnc_trimString

Parameters:

Returns: String

Examples

Example 1

["dreaded_is_the_man", 0, 6] call BIS_fnc_trimString;    // will return "dreaded"

Example 2

["dreaded_is_the_man", 15] call BIS_fnc_trimString;    // will return "man"

Example 3

["dreaded_is_the_man"] call BIS_fnc_trimString;        // will return "dreaded_is_the_man"

See also

select

Community notes

R3vo

"test" select [0, 4];                        // 0.0007 ms
["test", 0, 4] call BIS_fnc_trimString;    // 0.013 ms

The first method is about 18 times faster.