String has a method for that. Please review the String API.

Not sure what that means. I think you have a picture of your program's function in your head, but you haven't given us the whole...