← all problems

textAfter 🌶️🌶️

Write a method that takes two String parameters, text and target, and returns everything in text that comes after the first occurrence of target. For example, textAfter("key=value", "=") should return "value", and textAfter("Name: Ada", ": ") should return "Ada". You may assume target appears in text at least once. The answer can be the empty String if target is at the very end of text.