![]() |
|
[Java] Censoring - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] Censoring (/showthread.php?tid=3447678) |
Censoring - Acad3m1cM1n3r - Apr 30, 2013 Code @SuppressWarnings("deprecation")I'm trying to censor the words in the disapprovedWords array but I can't remember how to make it ignore the case. I tried using toLowerCase() but then the whole message is lowercase, which is pretty annoying. Help? :/ * - Emotional Patrick - Apr 30, 2013 Use some simple regex with the Matcher and Pattern classes. * - GamingManiac - Apr 30, 2013 What about the Java.lang.String.equalsIgnoreCase(String str) function? Would that work |