Case-insensitive comparison of two char sequences. @param l left sequence @param r right sequence @return true if sequences match exactly (ignoring char case)
(@NotNull CharSequence l, @NotNull CharSequence r)
| 315 | * @return true if sequences match exactly (ignoring char case) |
| 316 | */ |
| 317 | public static boolean equalsIgnoreCase(@NotNull CharSequence l, @NotNull CharSequence r) { |
| 318 | if (l == r) { |
| 319 | return true; |
| 320 | } |
| 321 | |
| 322 | int ll = l.length(); |
| 323 | if (ll != r.length()) { |
| 324 | return false; |
| 325 | } |
| 326 | |
| 327 | return equalsCharsIgnoreCase(l, r, ll); |
| 328 | } |
| 329 | |
| 330 | /** |
| 331 | * Case-insensitive comparison of two char sequences, with subsequence over second. |