code: public static boolean endsWith(final boolean caseSensitive, final CharSequence text, final CharSequence suffix) {
  
          if (text == null) {
              throw new IllegalArgumentException("Text cannot be null");
          }
          if (suffix == null) {
              throw new IllegalArgumentException("Suffix cannot be null");
          }
  
          if (text instanceof String && suffix instanceof String) {
              return (caseSensitive ? ((String)text).endsWith((String)suffix) : endsWith(caseSensitive, text, 0, text.length(), suffix, 0, suffix.length()));
          }
  
          return endsWith(caseSensitive, text, 0, text.length(), suffix, 0, suffix.length());
  
      }
docs: <p>
  Checks whether a text ends with a specified suffix.
  </p>
  
  @param caseSensitive whether the comparison must be done in a case-sensitive or case-insensitive way.
  @param text the text to be checked for suffixes.
  @param suffix the suffix to be searched.
  @return whether the text ends with the suffix or not.