BIS fnc inString: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "\[\[Category\:Function Group\: Strings(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
Line 39: Line 39:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Strings|{{uc:inString}}]]
 
[[Category:Functions|{{uc:inString}}]]
[[Category:Functions|{{uc:inString}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:inString}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:inString}}]]

Revision as of 13:13, 12 October 2020

Hover & click on the images for description

Description

Description:
Find a string within a string.
Execution:
call
Groups:
Strings

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

See also:
findBIS_fnc_filterStringsplitStringjoinString

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

Bottom Section