Considering the semantics of the problem, String#contains(...) is a better choice than String#indexOf(...) and has the added advantage of not requiring a secondary comparison with -1.
db
Type: Posts; User: Darryl.Burke
Considering the semantics of the problem, String#contains(...) is a better choice than String#indexOf(...) and has the added advantage of not requiring a secondary comparison with -1.
db