I need to check if a String with several words is at the beginning of another one. For example, I have a list of Strings containing things like: "in the morning", "in the evening", etc, and I want to check if my string st = "in the evening at 5" starts with any of the Strings in my list. I need a boolean answer to this and ideally a StringTokenizer with the remaining part "at 5".
My problem is that right now I have the string st splitted by a StringTokenizer (I needed it for a different reason), so I can't just used the methods substring or indexOf to check if it's contained.
Is there any simple way to do it? Or is there a way of converting the remaining items of the Tokenizer to a String again?
Thank you