List of utility methods to do String Equal
boolean | equals(String str1, String str2) equals return str1 == str2 || str1 != null && str1.equals(str2);
|
boolean | equalsIgnoreCase(String str1, String str2) equals Ignore Case return str1 != null && str1.equalsIgnoreCase(str2);
|
boolean | isEquals(String a, String b) is Equals return a.compareTo(b) == 0;
|
boolean | equals(final CharSequence cs1, final CharSequence cs2) equals if (cs1 == cs2) { return true; if (cs1 == null || cs2 == null) { return false; return cs1.toString().equals(cs2.toString()); |
boolean | equals(String str1, String str2) Comparing two strings, returns true if they are equal, if both are null -> result == true if (str1 == null) { return str2 == null; return str1.equals(str2); |
boolean | equal(String s1, String s2) equal if (s1 == s2) { return true; if (s1 == null) { return false; return s1.equals(s2); |
boolean | isEquals(String str1, String str2) is Equals if (str1 == str2) { return true; if (str1 != null) { return str1.equals(str2); } else { return false; |
boolean | equals(String str1, String str2) equals return str1 == null ? str2 == null : str1.equals(str2);
|
boolean | equalsIgnoreCase(String str1, String str2) equals Ignore Case return str1 == null ? str2 == null : str1.equalsIgnoreCase(str2);
|
boolean | equalsIgnoreCase(String string1, String string2) This method is missing in CLDC 1.0 String implementation if (string1 == null && string2 == null) { return true; if (string1 == null || string2 == null) { return false; if ((string1.toLowerCase()).equals(string2.toLowerCase())) { return true; ... |