getAllProfanity method

List<String> getAllProfanity(
  1. String inputString
)

Returns a list of all profanity found in the string.

Implementation

List<String> getAllProfanity(String inputString) {
  List<String> found = [];
  this.wordsToFilterOutList.forEach((word) {
    if (inputString.toLowerCase().split(' ').contains(word)) {
      found.add(word);
    }
  });
  return found;
}