title: Check if string is in list
body: <p>I am creating a chat filter and i want to remove any potential bad words. I have a list of strings which gets populated by a text file. I then allow the user to enter their message and i want to check if their message contains a bad word from the list i have made. The issue i have is that the code simply doesn't work. The boolean 'isBadWord' always returns valse. Can anybody help me with this please.</p>
  
  <p>I have made sure the text document loads correctly and the list does populate with the words which are not allowed.</p>
  
  <pre><code>void CheckMessage(string messageToSend)
  {
  
  
      bool isBadWord;
      if (purgeWords.Contains(messageToSend.ToLower()))
      {
          isBadWord = true;
      }
      else
      {
          isBadWord = false;
      }
  
  
      if (isBadWord == true)
      {
          print("badword");
          StartCoroutine(ClearMessageBadWord());
      }
      else
      {
          SendText(messageToSend);
      }
  }
  </code></pre>