The string value to be searched.
A string to be searched for within the value. Cannot be a regex. All
values that are not regexes are coerced to strings, so omitting it or passing undefined
causes strIncludes()
to search for the string "undefined", which is rarely what you want.
Optional
position: numberThe position within the string at which to begin searching for searchString. (Defaults to 0.)
true
if the search string is found anywhere within the given string value, including
when searchString is an empty string; otherwise, false
.
The strIncludes() method performs a case-sensitive search to determine whether one string may be found within another string, returning
true
orfalse
as appropriate.This method lets you determine whether or not a string includes another string.
Since
0.9.0
Throws
TypeError If searchString is a regex.