Let's start with the "more typing" solution. There are shorter ones but this one will get you started. In this forum we often give broad hints and send you looking in the API for details ...
Look at the API docs for
String to see if you can find "position of" and how to get the part of a string up to position i, the part of a string after position i. Take a shot at some code and let us see how it works.