The BadWordsFilter
is a C# library designed to help filter out predefined "bad" words from strings. It's useful for content moderation in forums, chat applications, and any text-based communication platform.
To use BadWordsFilter
, clone this repository and include it in your .NET project. Ensure you have the .NET environment set up correctly.
// Add bad words to the filter
BadWordsFilter.AddBadwords("badword1", "badword2");
// Filter a string
var result = BadWordsFilter.FilterWords("This is a badword1.");
Console.WriteLine(result); // Output: (true, "This is a *******.")
Contributions are welcome! Please fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License.