BIS fnc splitString: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
Lou Montana (talk | contribs) (Page filling) |
||
Line 1: | Line 1: | ||
{{Function|= Comments | {{Function|= Comments | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 8: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | Split spring according to given separators |= Description | ||
____________________________________________________________________________________________ | |||
| [stringToSplit, separators, byStr] call [[BIS_fnc_splitString]] |= Syntax | |||
|p1= stringToSplit: [[String]] |= Parameter 1 | |||
|p2= separators: [[String]] - (Optional, default "") each letter in it '''is''' a separator if ''byStr'' is [[false]]; not the whole word itself |= Parameter 2 | |||
|p3= byStr: [[Boolean]] - (Optional, default [[false]]) use [[splitString]] if set to [[true]] |= Parameter 3 | |||
| [[Array]] of [[String|Strings]] |= Return value | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| < | |x1= <code>["this is a test", " "] [[call]] [[BIS_fnc_splitString]]; {{codecomment|// returns ["this", "is", "a", "test"]}}</code> |= Example 1 | ||
| | |x2= <code>["this is a test", "st"] [[call]] [[BIS_fnc_splitString]]; {{codecomment|// returns ["hi"," i"," a ","e"]}}</code> |= Example 2 | ||
| |= | |x3= <code>["this is a test", "is"] [[call]] [[BIS_fnc_splitString]]; {{codecomment|// returns ["th"," "," a te","t"]}}</code> |= Example 3 | ||
|x4= <code>["this is a test", "is", [[true]]] [[call]] [[BIS_fnc_splitString]]; {{codecomment|// returns ["th"," "," a test"]}}</code> |= Example 4 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| |= See also | | [[splitString]], [[toArray]], [[toString]] |= See also | ||
}} | }} | ||
Revision as of 09:19, 7 May 2018
Description
- Description:
- Split spring according to given separators
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [stringToSplit, separators, byStr] call BIS_fnc_splitString
- Parameters:
- stringToSplit: String
- separators: String - (Optional, default "") each letter in it is a separator if byStr is false; not the whole word itself
- byStr: Boolean - (Optional, default false) use splitString if set to true
- Return Value:
- Array of Strings
Examples
- Example 1:
["this is a test", " "] call BIS_fnc_splitString; // returns ["this", "is", "a", "test"]
- Example 2:
["this is a test", "st"] call BIS_fnc_splitString; // returns ["hi"," i"," a ","e"]
- Example 3:
["this is a test", "is"] call BIS_fnc_splitString; // returns ["th"," "," a te","t"]
- Example 4:
["this is a test", "is", true] call BIS_fnc_splitString; // returns ["th"," "," a test"]
Additional Information
- See also:
- splitStringtoArraytoString
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