Swift: how to censor/filter text entered for swear words, etc?
<p>I just want to see whether there is an established way to do this, or how one would go about this. </p>

<p>I have a text field that essentially acts as a form in my iOs app where a user can post something. I can't have users posting swear words/inappropriate crap, so I want to filter out and display an error if the string they enter contains one of these words. </p>

<p>How do other apps in Swift do this? Do they just search through the string to see if it contains the word (obviously not within other words, but standing alone) or is there another method? </p>

<p>How can I accurately filter out the swear words from my user post in Swift?</p>