contains( )
boolean
contains(string s1, string s2
)
This function returns true if s2
is a substring of s1
—that is, if s1
contains s2
. Otherwise, it is false. For example,
contains("A very Charming cat"
,
"Charm")
is true, but contains("A
very Charming cat"
, "Marjorie")
is false. The test is
case-sensitive. For example, contains("A
very charming cat"
, "Charm")
is false. Nonstrings may also be
passed to this function, in which case they're automatically
converted to strings as if by the string()
function.