Test if value ends with search.

@param value         input string
@param search        string to search
@param position      position till which you want to search.
@param caseSensitive true or false
@return true or false
545449
public static boolean endsWith(final String value, final String search, final int position,
                                   final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        int remainingLength = position - search.length();
        if (caseSensitive) {
            return value.indexOf(search, remainingLength) > -1;
        }
        return value.toLowerCase().indexOf(search.toLowerCase(), remainingLength) > -1;
    }
762947
public static boolean isCaseInsensitive()
  {
    Boolean value = _caseInsensitive.get();

    if (value == null) {
      return _isCaseInsensitive;
    }
    else
      return value.booleanValue();
  }
658301
public static boolean endsWithIgnoreCase(String s,String w)
    {
        if (w==null)
            return true;
        
        int sl=s.length();
        int wl=w.length();
        
        if (s==null || sl<wl)
            return false;
        
        for (int i=wl;i-->0;)
        {
            char c1=s.charAt(--sl);
            char c2=w.charAt(i);
            if (c1!=c2)
            {
                if (c1<=127)
                    c1=lowercases[c1];
                if (c2<=127)
                    c2=lowercases[c2];
                if (c1!=c2)
                    return false;
            }
        }
        return true;
    }
46043
public static boolean containsAny(final String value, final String[] needles, final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        return Arrays.stream(needles).anyMatch(needle -> contains(value, needle, caseSensitive));
    }
913612
private static boolean containsFloatingPointCharacters (String value) {
		for (int i = 0, n = value.length(); i < n; i++) {
			switch (value.charAt(i)) {
			case '.':
			case 'E':
			case 'e':
				return true;
			}
		}
		return false;
	}
766965
public boolean containsValue(Object value) {
        for (LinkedHashMapEntry<K,V> e = head; e != null; e = e.after) {
            V v = e.value;
            if (v == value || (value != null && value.equals(v)))
                return true;
        }
        return false;
    }
101867
public static int lastIndexOfIgnoreCase(String str, String searchStr) {
		if (searchStr.isEmpty() || str.isEmpty())
			return -1;
		return str.toLowerCase().lastIndexOf(searchStr.toLowerCase());
	}
636209
void doFindNext()
    {
        String query = searchPanel.getQuery();
        if (query.isEmpty())
        {
            return;
        }
        
        String text = getDocumentText();
        boolean ignoreCase = !searchPanel.isCaseSensitive();

        int caretPosition = textComponent.getCaretPosition();
        int textLength = text.length();
        int newCaretPosition = (caretPosition + 1) % textLength;
        Point match = JTextComponents.findNext(
            text, query, newCaretPosition, ignoreCase);
        if (match == null)
        {
            match = JTextComponents.findNext(
                text, query, 0, ignoreCase);
        }
        handleMatch(match);
    }
322277
boolean endsWith(final Literal literal) {

        // Check whether the answer is already in the cache
        final int index = literal.getIndex();
        final Boolean cached = myPostfixCache.get(index);
        if (cached != null) {
            return cached.booleanValue();
        }

        // Get the answer and cache the result
        final boolean result = literal.matches(myChars, myChars.length - literal.getLength());
        myPostfixCache.set(index, result);
        return result;
    }
1267090
public static boolean endsWithIgnoreCase(final String base, final String end) {
	if (base.length() < end.length()) {
	    return false;
	}
	return base.regionMatches(true, base.length() - end.length(), end, 0, end.length());
    }
699908
function endsWith(target, searchString, position) {
  position = position || target.length;
  position = position - searchString.length;
  let lastIndex = target.lastIndexOf(searchString);
  return lastIndex !== -1 && lastIndex === position;
}
244955
private static boolean containsIgnoreCase(String str, String searchStr) {
    if (str == null || searchStr == null) {
      return false;
    }
    int len = searchStr.length();
    int max = str.length() - len;
    for (int i = 0; i <= max; i++) {
      if (str.regionMatches(true, i, searchStr, 0, len)) {
        return true;
      }
    }
    return false;
  }
1077860
public static boolean startsWithIgnoreCase(final String str, final String prefix, final int offset) {
        
        if (str == null || prefix == null) {
            return (str == null && prefix == null);
        }
        
        if(str.length() < offset) {
            return false;
        }
        
        final String subStr = str.substring(offset);
        return startsWithIgnoreCase(subStr, prefix);
        
    }
949931
public static boolean isUpperCase(final String value) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        for (int i = 0; i < value.length(); i++) {
            if (Character.isLowerCase(value.charAt(i))) {
                return false;
            }
        }
        return true;
    }
871069
public boolean matches(String target, int start, int end) {
		return this.matches(target, start, end, (Match) null);
	}
45248
public static boolean endsWithIgnoreCase(String str, String suffix) {
        if (str == null || suffix == null) {
            return false;
        }
        if (str.endsWith(suffix)) {
            return true;
        }
        if (str.length() < suffix.length()) {
            return false;
        }

        String lcStr = str.substring(str.length() - suffix.length()).toLowerCase();
        String lcSuffix = suffix.toLowerCase();
        return lcStr.equals(lcSuffix);
    }
204758
public static boolean contains(final String value, final String needle, final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        if (caseSensitive) {
            return value.contains(needle);
        }
        return value.toLowerCase().contains(needle.toLowerCase());
    }