/* Returns true if the string in value has to be skipped for spell checking
501678
function hasToSkip(value) {
            return options.skipWords.has(value) ||
                lodash.find(options.skipIfMatch, function (aPattern) {
                    return value.match(aPattern);
                });
        }
1006351
public static boolean isStringTrue(String in) {
    if (in == null)
      return false;
    return in.equalsIgnoreCase("TRUE") || in.equalsIgnoreCase("YES") || in.equals("1");
  }
1091378
private boolean isVarEscaped(char[] array, int currentIndex)
    {
        int i = currentIndex - 1;

        while (i >= 0 && array[i] == '\\') {
            --i;
        }

        return (currentIndex - i) % 2 == 0;
    }
924122
private static boolean isAllowed(char c, String allow) {
        return (c >= 'A' && c <= 'Z')
                || (c >= 'a' && c <= 'z')
                || (c >= '0' && c <= '9')
                || "_-!.~'()*".indexOf(c) != NOT_FOUND
                || (allow != null && allow.indexOf(c) != NOT_FOUND);
    }
1181774
function isEscapeingAt(string, index) {
	if (index === 0) { return false; }
	let i = index - 1;
	while (
		i >= 0 && string[i] === '\\'
	) { --i; }
	return (index - i) % 2 === 0;
}
229816
function isIgnore (ignore, str) {
  let result = false
  let i = 0
  while (!result && i < ignore.length) {
    if (ignore[i] === str) {
      result = true
    }

    i++
  }
  return result
}
862006
public boolean textContains(String value, String expectedSubstring) {
        boolean result = false;
        if (value != null) {
            result = value.contains(expectedSubstring);
        }
        return result;
    }
42535
function checkIsHttpToken(val) {
  if (typeof val !== 'string' || val.length === 0)
    return false;
  if (!isValidTokenChar(val.charCodeAt(0)))
    return false;
  const len = val.length;
  if (len > 1) {
    if (!isValidTokenChar(val.charCodeAt(1)))
      return false;
    if (len > 2) {
      if (!isValidTokenChar(val.charCodeAt(2)))
        return false;
      if (len > 3) {
        if (!isValidTokenChar(val.charCodeAt(3)))
          return false;
        for (var i = 4; i < len; i++) {
          if (!isValidTokenChar(val.charCodeAt(i)))
            return false;
        }
      }
    }
  }
  return true;
}
1006699
function isStringLiteralCode(s) {
    return (
        (s.startsWith("'") && s.endsWith("'")) ||
        (s.startsWith('"') && s.endsWith('"'))
    )
}
1175054
static boolean isCOctetStringNullOrNValValid(String value,
            int length) {
        if (value == null) {
            return true;
        }
        
        if (value.length() == 0) {
            return true;
        }
        
        if (value.length() == length - 1) {
            return true;
        }
        return false;
    }
706295
protected boolean check(String value, String regex) {
		Pattern pattern = Pattern.compile(regex);
		return pattern.matcher(value).matches();
	}
944685
function (str) {
      var strlen = str.length;
      if (this.html.substr(this.currentChar, strlen).toLowerCase() === str.toLowerCase()) {
        this.currentChar += strlen;
        return true;
      }
      return false;
    }
1341896
private String skipUntilEL() {
        char prev = 0;
        StringBuffer buf = new StringBuffer();
        while (hasNextChar()) {
            char ch = nextChar();
            if (prev == '\\') {
                prev = 0;
                if (ch == '\\') {
                    buf.append('\\');
                    if (!escapeBS)
                        prev = '\\';
                } else if (ch == '$' || ch == '#') {
                    buf.append(ch);
                }
                // else error!
            } else if (prev == '$' || prev == '#') {
                if (ch == '{') {
                    this.type = prev;
                    prev = 0;
                    break;
                }
                buf.append(prev);
                prev = 0;
            }
            if (ch == '\\' || ch == '$' || ch == '#') {
                prev = ch;
            } else {
                buf.append(ch);
            }
        }
        if (prev != 0) {
            buf.append(prev);
        }
        return buf.toString();
    }
1352442
function isDistinguishedName(value) {
  log.trace('isDistinguishedName(%s)', value);
  if ((! value) || (value.length === 0)) return(false);
  re.isDistinguishedName.lastIndex = 0; // Reset the regular expression
  return(re.isDistinguishedName.test(value));
}
738936
protected boolean isNullcaseForEscape(String nextLine, boolean inQuotes, int i, String sb) {
        boolean result = false, hasmet = false;
        for (int k = 0; k < sb.length(); k++) {
            char c = sb.charAt(k);
            if (Character.isWhitespace(c)) continue;
            else if (c == quotechar) {
                if (!inQuotes || hasmet) return false;
                hasmet = true;
                continue;
            } else
                return false;
        }
        hasmet = false;
        if (nextLine.length() > (i + 1) && (nextLine.charAt(i + 1) == 'N' )) {
            for (int j=i+2;j < nextLine.length(); j++) {
                char c = nextLine.charAt(j);
                if (Character.isWhitespace(c)) continue;
                else if (c == quotechar) {
                    if (!inQuotes || hasmet) return false;
                    hasmet = true;
                    continue;
                } else if (c == separator) break;
                else return false;
            }
            result = true;
        }
        return result;
    }
1023767
private boolean isTrue(String value) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(value)) {
            if (Boolean.valueOf(value.toLowerCase()).booleanValue()
                || value.toLowerCase().equals("on")
                || value.toLowerCase().equals("yes")
                || value.toLowerCase().equals("checked")
                || value.toLowerCase().equals("selected")) {
                return true;
            }
        }
        return false;
    }
1135349
boolean checkSuffix(char[] chars, int[] cursor) {
    if (suffix == null)
      return true;
    if (cursor[1] - cursor[0] < suffix.minlen)
      // a conservative test, but if we can't pass it, we'll certainly fail later
      return false;
    int last = suffix.items.length - 1;
    for (int i = last; i >= 0; i--) {
      Object item = suffix.items[i];
      if (item == Pattern.matchOne)
        if (!topicSkipBackward(chars, cursor))
          return false;
        else
          ; // topic skip succeeded so continue
      else if (!matchBackward(chars, (char[]) item, cursor))
        return false;
      // else this phase succeeded so continue
    }
    // The suffix matches exactly.  But, the preceding character MUST be a separator.  We
    // don't allow start-of-string because we would not have checked the suffix
    // at all if it were allowed to extend to the beginning (it would then be identical
    // to the prefix).
    return cursor[0] < cursor[1] && 
      chars[cursor[1]-1] == MatchSpace.SUBTOPIC_SEPARATOR_CHAR;
  }