Java tutorial
//package com.java2s; public class Main { public static boolean equalsIgnoreCase(String a, String b) { return (a == b) || (b != null) && (a.length() == b.length()) && a.regionMatches(true, 0, b, 0, b.length()); } public static int length(CharSequence s) { return s == null ? 0 : s.length(); } }