/** * Compares the specified string to this string ignoring the case of the * characters and returns true if they are equal. * * @param string * the string to compare. * @return {@code true} if the specified string is equal to this string, * {@code false} otherwise. */ @FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ") public boolean equalsIgnoreCase(String string) { if (string == this) { return true; } if (string == null || count != string.count) { return false; } int o1 = offset, o2 = string.offset; int end = offset + count; char[] target = string.value; while (o1 < end) { char c1 = value[o1++]; char c2 = target[o2++]; if (c1 != c2 && foldCase(c1) != foldCase(c2)) { return false; } } return true; }
/** * Compares the specified string to this string ignoring the case of the * characters and returns true if they are equal. * * @param string * the string to compare. * @return {@code true} if the specified string is equal to this string, * {@code false} otherwise. */ @FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ") public boolean equalsIgnoreCase(String string) { if (string == this) { return true; } if (string == null || count != string.count) { return false; } int o1 = offset, o2 = string.offset; int end = offset + count; char[] target = string.value; while (o1 < end) { char c1 = value[o1++]; char c2 = target[o2++]; if (c1 != c2 && foldCase(c1) != foldCase(c2)) { return false; } } return true; }
/** * Compares the specified string to this string ignoring the case of the * characters and returns true if they are equal. * * @param string * the string to compare. * @return {@code true} if the specified string is equal to this string, * {@code false} otherwise. */ @FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ") public boolean equalsIgnoreCase(String string) { if (string == this) { return true; } if (string == null || count != string.count) { return false; } int o1 = offset, o2 = string.offset; int end = offset + count; char[] target = string.value; while (o1 < end) { char c1 = value[o1++]; char c2 = target[o2++]; if (c1 != c2 && foldCase(c1) != foldCase(c2)) { return false; } } return true; }
/** * Compares the specified string to this string ignoring the case of the * characters and returns true if they are equal. * * @param string * the string to compare. * @return {@code true} if the specified string is equal to this string, * {@code false} otherwise. */ @FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ") public boolean equalsIgnoreCase(String string) { if (string == this) { return true; } if (string == null || count != string.count) { return false; } int o1 = offset, o2 = string.offset; int end = offset + count; char[] target = string.value; while (o1 < end) { char c1 = value[o1++]; char c2 = target[o2++]; if (c1 != c2 && foldCase(c1) != foldCase(c2)) { return false; } } return true; }
/** * Compares the specified string to this string ignoring the case of the * characters and returns true if they are equal. * * @param string * the string to compare. * @return {@code true} if the specified string is equal to this string, * {@code false} otherwise. */ @FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ") public boolean equalsIgnoreCase(String string) { if (string == this) { return true; } if (string == null || count != string.count) { return false; } int o1 = offset, o2 = string.offset; int end = offset + count; char[] target = string.value; while (o1 < end) { char c1 = value[o1++]; char c2 = target[o2++]; if (c1 != c2 && foldCase(c1) != foldCase(c2)) { return false; } } return true; }
/** * Compares the specified string to this string ignoring the case of the * characters and returns true if they are equal. * * @param string * the string to compare. * @return {@code true} if the specified string is equal to this string, * {@code false} otherwise. */ @FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ") public boolean equalsIgnoreCase(String string) { if (string == this) { return true; } if (string == null || count != string.count) { return false; } int o1 = offset, o2 = string.offset; int end = offset + count; char[] target = string.value; while (o1 < end) { char c1 = value[o1++]; char c2 = target[o2++]; if (c1 != c2 && foldCase(c1) != foldCase(c2)) { return false; } } return true; }
/** * Compares the specified string to this string ignoring the case of the * characters and returns true if they are equal. * * @param string * the string to compare. * @return {@code true} if the specified string is equal to this string, * {@code false} otherwise. */ @FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ") public boolean equalsIgnoreCase(String string) { if (string == this) { return true; } if (string == null || count != string.count) { return false; } int o1 = offset, o2 = string.offset; int end = offset + count; char[] target = string.value; while (o1 < end) { char c1 = value[o1++]; char c2 = target[o2++]; if (c1 != c2 && foldCase(c1) != foldCase(c2)) { return false; } } return true; }