← all problems

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.