You could use the string.Contains method to determine whether a string contains a specific word:
string s = "My cat is missing"; if (s.Contains("cat")) { //word was found... }
No comments:
Post a Comment