Page 1 of 1

Function: contains()

Posted: 02 May 2013 09:37
by Rm.
Required function: boolean contains(String s, String charSequence)

Description:
Returns true if and only if this string contains the specified sequence of char values. I know the same can be done using indexOf() > -1 or matches(regex), but it just seems better to have non-regular expression contains() method and not to use indexOf() > -1.