Skip to content

Commit

Permalink
Update fnc_substr.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Aug 6, 2023
1 parent 01db3a1 commit 1407a09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion addons/strings/fnc_substr.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ SCRIPT(substr);
params ["_string", "_startIndex", ["_length", 0]];

// Check if _length is set else extract string to end
if (_length <= 0) exitWith {_string select [_startIndex]};
if (_length <= 0) exitWith {
_string select [_startIndex] // return
};

// Cut out string
_string select [_startIndex, _length] // return

0 comments on commit 1407a09

Please sign in to comment.