Hello,
I have a GUI TextField in my game where you can submit a string of text to my server.
What I want to do though, is to search the string for any profanity and offensive words before submitting.
if(GUI.Button(Rect(100,120,150,30),"Create")){
if(newPlayer == "f**k" || newPlayer == "s**t"){
print("Profanity Found");
}
else{
AddVariables();
}
}
The problem with the methord I’m using is that it will only pull the string if it says “f–k” - where as some genius might submit “KingOfF–King”. So is there a way to search the whole string for specific keywords and pull it up?
Thanks ![]()
Yes. I consider this bad only because every newbie programmer will put it in some kind of Update sooner or later. Just wait.
– andrew-lukasik