Added helper function to determine if character is in a string