BIS fnc trimString: Difference between revisions
| mNo edit summary | m (Text replacement - "\[\[Category\:Function Group\: Strings(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "") | ||
| Line 53: | Line 53: | ||
| <h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
| [[Category:Functions|{{uc:trimString}}]] | [[Category:Functions|{{uc:trimString}}]] | ||
| [[Category:{{Name|arma3}}: Functions|{{uc:trimString}}]] | [[Category:{{Name|arma3}}: Functions|{{uc:trimString}}]] | ||
Revision as of 13:11, 12 October 2020
 
Description
Syntax
- Syntax:
- [someText, beginning, length] call BIS_fnc_trimString
- Parameters:
- someText: String - source string
- beginning: Number (Optional, default 0) - start index; indexing starts at 0
- length: Number (Optional, default end of string) - end index. A negative number means X chars from the string end
- Return Value:
- 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"
Additional Information
- See also:
- See also needed
Notes
- 
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
 Only post proven facts here! Add Note
Notes
- Posted on August 24, 2017 - 15:45 (UTC)
- Revo
- 
"test" select [0,4];Result: 0.0007 ms
 ["test",0,4] call BIS_fnc_trimString;Result: 0.013 ms
 The first method is about 18 times faster.
 
	