I have to take a sentence, and turn it into pig latin.

I can get the sentence to come in no problem, but when I go to deciper each word into the Pig Latin, it looks at the whole sentence string instead of just one word at a time. I also have to take into account punctuation. Should I be using the substring, or the .find or what?? I'm stumped.