containsText 🌶️
Write a method that takes two String parameters, text and target, and returns true if target appears anywhere inside text, and false if it does not. For example, containsText("hello world", "wor") should return true and containsText("hello", "z") should return false. Capital and lowercase letters are different, so containsText("Hello", "hello") is false.
indexOf returns -1 when the target is NOT in the String, and 0 or more when it is. Which comparison turns that number into true or false?
Does a match at the very start count as found? Would comparing with > 0 handle that correctly?