BIS fnc inString: Difference between revisions
Jump to navigation
Jump to search
m (see also) |
m (template:command argument fix) |
||
Line 8: | Line 8: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|Find a string within a string. |= | |Find a string within a string. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [searchTerm, searchText(, caseSensitive)] call BIS_fnc_inString; |= | | [searchTerm, searchText(, caseSensitive)] call BIS_fnc_inString; |SYNTAX= | ||
|p1= searchTerm: [[String]] - string to find|= Parameter 1 | |p1= searchTerm: [[String]] - string to find|= Parameter 1 | ||
Line 17: | Line 17: | ||
|p3= caseSensitive (optional): [[Boolean]] - defines whether the search is case-sensitive (true) or not (false, by default)|= Parameter 3 | |p3= caseSensitive (optional): [[Boolean]] - defines whether the search is case-sensitive (true) or not (false, by default)|= Parameter 3 | ||
| [[Boolean]] - true if search term is found, false if not |= | | [[Boolean]] - true if search term is found, false if not |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 25: | Line 25: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[find]], [[BIS_fnc_filterString]], [[splitString]], [[joinString]] |= | | [[find]], [[BIS_fnc_filterString]], [[splitString]], [[joinString]] |SEEALSO= | ||
}} | }} |
Revision as of 11:29, 7 April 2019
Description
- Description:
- Find a string within a string.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [searchTerm, searchText(, caseSensitive)] call BIS_fnc_inString;
- Parameters:
- searchTerm: String - string to find
- searchText: String - string to search in
- caseSensitive (optional): Boolean - defines whether the search is case-sensitive (true) or not (false, by default)
- Return Value:
- Boolean - true if search term is found, false if not
Examples
- Example 1:
["rabbit", "I ate a rabbit today"] call BIS_fnc_inString // will return true
- Example 2:
["RaBbiT", "I ate a rabbit today"] call BIS_fnc_inString // will return true
- Example 3:
["RaBbiT", "I ate a rabbit today", true] call BIS_fnc_inString // will return false because of case sensitivity
Additional Information
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