Tests if this string starts with the specified prefix, ignoring case

@param input the input
@param prefix the prefix
@return True if the input starts with the prefix when ignoring case, False if not
972642
public static boolean startsWithIgnoreCase(String input, String prefix) {
        if (input == null || prefix == null || prefix.length() > input.length()) {
            return false;
        } else {
            final char[] inputCharArray = input.toCharArray();
            final char[] prefixCharArray = prefix.toCharArray();
            for (int i = 0; i < prefixCharArray.length; i++) {
                if (!equalsIgnoreCase(prefixCharArray[i], inputCharArray[i])) {
                    return false;
                }
            }
            return true;
        }
    }
1140018
public void setDefaultPrefix(final String prefix) {
		lock.writeLock().lock();
		try {
			final String myPrefix = checkAndConvertPrefix(prefix);
			final List<String> prefixList = split(myPrefix);
			setDefaultPrefixes(prefixList);
		} finally {
			lock.writeLock().unlock();
		}
	}
138139
public void setPrefix(String prefix)
  {
    _prefix = prefix;
    
    if (prefix != null)
      _pathPrefix = prefix.replace('.', '/');
  }
131242
public static boolean isValidJavaClassName(String input) {
		if (!StringUtils.hasText(input)) {
			return false;
		}
		if (!Character.isJavaIdentifierStart(input.charAt(0))) {
			return false;
		}
		if (input.length() > 1) {
			for (int i = 1; i < input.length(); i++) {
				if (!Character.isJavaIdentifierPart(input.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	}
1140281
public static function startsWith($string, $prefix)
    {
        $string = is_int($string) ? "$string" : $string;
        $prefix = is_int($prefix) ? "$prefix" : $prefix;
        return is_string($string) && is_string($prefix) && mb_substr($string, 0, mb_strlen($prefix)) === $prefix;
    }
1276576
public static final Function<String, Boolean> startsWith(final String prefix, final int offset) {
        return new StartsWith(prefix, offset);
    }
872836
private boolean noInput(Input input) {
		return input.words().isEmpty()
				|| (input.words().size() == 1 && input.words().get(0).trim().isEmpty())
				|| (input.words().iterator().next().matches("\\s*//.*"));
	}
1240986
public static boolean startsWith(CharSequence seq, CharSequence pattern, IntUnaryOperator op)
    {
        if (pattern.length() > seq.length())
        {
            return false;
        }
        int length = pattern.length();
        for (int ii=0;ii<length;ii++)
        {
            if (op.applyAsInt(seq.charAt(ii)) != op.applyAsInt(pattern.charAt(ii)))
            {
                return false;
            }
        }
        return true;
    }
860387
function __stringStartsWith(str, prefix) {
  // returns true for empty string or null prefix
  if ((!str)) return false;
  if (prefix == "" || prefix == null) return true;
  return str.indexOf(prefix, 0) === 0;
}
735413
public boolean isNumeralPunctuation(final String input) {
        for (int i = 0; i < input.length(); i++) {
            if (!isNumeralPunctuation(input.charAt(i))) {
                return false;
            }
        }
        return true;
    }
1303822
public boolean startsWith(final Bits key) {
    if (key.bitLength > this.bitLength) {
      return false;
    }
    final Bits prefix = key.bitLength < this.bitLength ? this.range(0,
      key.bitLength) : this;
    return prefix.compareTo(key) == 0;
  }
1005776
private boolean checkAnswer(String input) {
        StringTokenizer tok = new StringTokenizer(validAnswers, ANSWER_SEPARATOR);

        while (tok.hasMoreTokens()) {
            if (tok.nextElement().toString().trim().equalsIgnoreCase(input.trim())) {
                return true;
            }
        }

        log.info("User input is not valid - must be one of " + validAnswers);

        return false;
    }
1178873
public static boolean startsWith( String text , String prefix , int offset , boolean ignoreCase )
    {
        if (ignoreCase)
            return startsWithIgnoreCase(text,prefix,offset);
        else
            return text.startsWith(prefix,offset);
    }
754573
public boolean matches(CharSequence input) {
        separatorCount = -1;
        separatorIndex = 0;

        if (input == null) {
            this.input = null;
            separatorFlags = null;
            return false;
        }

        this.input = input;
        separatorFlags = new int[input.length()];

        boolean result = matches(pattern, input, separatorFlags);

        if (result) {
            for (int i = separatorFlags.length - 1; i >= 0; i--) {
                if (separatorFlags[i] > 0) {
                    separatorCount = separatorFlags[i];
                    break;
                }
            }
        }

        return result;
    }
718215
function hasPrefix(text, prefix) {
  let exp = new RegExp(`^${prefix.pattern}`);
  let result = exp.test(text);

  if (prefix.antipattern) {
    let exp = new RegExp(`^${prefix.antipattern}`);
    result = result && !exp.test(text);
  }

  return result;
}
610722
@Override
	public boolean startsWithCurrentPrefix(final String key) {
		lock.readLock().lock();
		try {
			if (getPrefix() != null && key != null) {
				return key.startsWith(getPrefix() + getPrefixDelimiter());
			}
		} finally {
			lock.readLock().unlock();
		}
		return false;
	}
343169
public boolean startsWith(final String str) {
        if (str == null) {
            return false;
        }
        final int len = str.length();
        if (len == 0) {
            return true;
        }
        if (len > size) {
            return false;
        }
        for (int i = 0; i < len; i++) {
            if (buffer[i] != str.charAt(i)) {
                return false;
            }
        }
        return true;
    }