Another newbie code question

Hi all,

What would be the best way to approach the following in regards to code??

To read text incoming from another device and perform an action when a certain word is encountered. I think I understand how to perform the action (assert a pin high), but I am having trouble learning how to look for and recognize the word in the text stream. Strings? Switch statement?

Thanks in advance,

Geno