List of utility methods to do String Contain
boolean | contains(String str1, String str2) contains return str1 != null && str1.contains(str2);
|
boolean | checkContainSpace(final String x) Check string for containing space. return !(x != null && x.contains(SPACE));
|
boolean | containsCharRef(String s) Determines if a string contains what looks like an html character reference. return characterReferencePattern.matcher(s).find();
|
boolean | contains(final CharSequence seq, final CharSequence searchSeq) contains if (seq == null || searchSeq == null) { return false; return seq.toString().indexOf(searchSeq.toString()) >= 0; |
int | containCount(String str, String searchStr) contain Count int i = 0; int idx = 0; if (str == null || searchStr == null) { return 0; while (true) { if ((idx = str.indexOf(searchStr)) > INDEX_NOT_FOUND) { str = substring(str, (idx + searchStr.length()), ... |
boolean | contains(String str, String searchStr) contains if (str == null || searchStr == null) { return false; return str.indexOf(searchStr) > INDEX_NOT_FOUND; |
boolean | contains(String[] str, String searchStr) contains boolean val = false; if (str == null || searchStr == null) { return val; for (String s : str) { if (StringUtil.equals(s, searchStr)) { val = true; break; ... |
boolean | contains(String str, List contains if (str == null || keywords == null) { return false; for (String key : keywords) { if (contains(str, key)) { return true; return false; |
String | cutWords(String src, String contains) cut Words int begin = src.indexOf(contains); if (begin == -1) { return src; int end = begin + contains.length(); String beginStr = ""; if (begin != 0) { beginStr = src.substring(0, begin); ... |
String | cutWordsAll(String src, String contains) cut Words All String result = cutWords(src, contains); if (result.indexOf(contains) != -1) { return cutWordsAll(result, contains); return result; |