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