String.equalsIgnoreCase [1] public boolean equalsIgnoreCase(String anotherString)
ケースを無視して内容が等しいか調べます。投入された文字列が大文字と小文字の区別なしに等しい場合 true を返します。
String msg = "hoge"; String str = "text"; if (msg.equalsIgnoreCase(str)) { System.out.println("true"); }