code: private static boolean endsWith(final CharSequence str, final CharSequence suffix, final boolean ignoreCase) {
          if (str == null || suffix == null) {
              return str == null && suffix == null;
          }
          if (suffix.length() > str.length()) {
              return false;
          }
          final int strOffset = str.length() - suffix.length();
          return CharSequenceUtils.regionMatches(str, ignoreCase, strOffset, suffix, 0, suffix.length());
      }
docs: <p>Check if a CharSequence ends with a specified suffix (optionally case insensitive).</p>
  
  @see java.lang.String#endsWith(String)
  @param str  the CharSequence to check, may be null
  @param suffix the suffix to find, may be null
  @param ignoreCase indicates whether the compare should ignore case
  (case insensitive) or not.
  @return {@code true} if the CharSequence starts with the prefix or
  both {@code null}