Test if the given String starts with the specified prefix,
ignoring upper/lower case.
@param str the String to check
@param prefix the prefix to look for
@see java.lang.String#startsWith
198487
public static boolean startsWithIgnoreCase(String str, String prefix) {
        if (str == null || prefix == null) {
            return false;
        }
        if (str.startsWith(prefix)) {
            return true;
        }
        if (str.length() < prefix.length()) {
            return false;
        }
        String lcStr = str.substring(0, prefix.length()).toLowerCase();
        String lcPrefix = prefix.toLowerCase();
        return lcStr.equals(lcPrefix);
    }
922204
boolean isAllUppercase(final String str) {
    for (int i = 0; i < str.length(); i++) {
      char c = str.charAt(i);
      if (Character.isLetter(c) && Character.isLowerCase(c)) {
        return false;
      }
    }
    return true;
  }
669846
public boolean endsWith(final String str) {
        if (str == null) {
            return false;
        }
        final int len = str.length();
        if (len == 0) {
            return true;
        }
        if (len > size) {
            return false;
        }
        int pos = size - len;
        for (int i = 0; i < len; i++,pos++) {
            if (buffer[pos] != str.charAt(i)) {
                return false;
            }
        }
        return true;
    }
625878
public function startsWith($str)
    {
        self::mustBeString($str, 'Searched starting string');

        $str = preg_quote($str, '/');

        return (boolean) preg_match("/^$str/", $this->value);
    }
468007
@Override
	public void setPrefix(final String prefixString) {
		lock.writeLock().lock();
		try {
			if (prefixString == null || StringUtils.isBlank(prefixString)) {
				localPrefix.remove();
			} else {
				if (prefixes != null) {
					if (!prefixes.contains(prefixString)) {
						throw new IllegalArgumentException("The given prefix is not part of the prefixes.");
					}
				}
				localPrefix.set(prefixString);
			}
		} finally {
			lock.writeLock().unlock();
		}
	}
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;
    }
29166
def startswith_field(field, prefix):
    
    if prefix.startswith("."):
        return True
        # f_back = len(field) - len(field.strip("."))
        # p_back = len(prefix) - len(prefix.strip("."))
        # if f_back > p_back:
        #     return False
        # else:
        #     return True

    if field.startswith(prefix):
        if len(field) == len(prefix) or field[len(prefix)] == ".":
            return True
    return False
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;
    }
947828
private static boolean startsWith(String str, String... prefixes) {
        for (String prefix : prefixes) {
            if (str.startsWith(prefix)) return true;
        }
        return false;
    }
1187073
public static boolean endsWith(String str, char suffix) {
	return str != null && str.length() > 0 && str.charAt(str.length() - 1) == suffix;
    }
561455
public boolean setExpr(String str){
		Loc loc=new Loc();
		loc.v=0;
		int num1,num2,op;
		num1=chn2Num(str,loc);
		if(num1<0)
			return false;
		op=chn2Op(str,loc);
		if(op<0)
			return false;
		num2=chn2Num(str,loc);
		if(num2<0)
			return false;
		if(!this.checkSuffix(str, loc))
			return false;
		this.num1=num1;
		this.num2=num2;
		this.op=op;
		return true;
	}
34887
public static boolean isFirstCap(String str) {
    	if (isAllCap(str)) return false;
    	
		if (str.length() > 0 && Character.isLetter(str.charAt(0)) &&
				Character.isUpperCase(str.charAt(0))) {
		    return true;
		}
		
		return false;
    }
1277395
function prepend(str, prefix) {
    if (!str && str !== 0) {
        str = '';
    } else {
        str = str.toString();
    }
    return prefix + str;
}
597344
public static boolean endsWithPunc(String str) {
		if (str.endsWith(".") || str.endsWith("?") || str.endsWith("!") ||
			    str.endsWith(",") || str.endsWith(":") || str.endsWith("\"") || 
			    str.endsWith("'") || str.endsWith("''") || str.endsWith(";")) {
		    return true;
		}
		
		return false;
    }
942974
def start_with(prefix, beg, len)
      s = @s
      c = @cur
      if @len - c < len
        return false
      end
      word = s.unpack("U*")[c]
      if word.nil?
        return (prefix.slice(beg, len-beg) == nil)
      else
        [word].pack("U*").starts_with?(prefix.slice(beg, len-beg))
      end
    end
117623
public static boolean startsWithIgnoreCase( String text , String prefix , int offset )
    {
        int textLen = text.length();
        int prefixLen = prefix.length();
        
        if (offset < 0 || (offset > textLen - prefixLen))
            return false;
        
        for(int n=0;n<prefixLen;n++)
        {
            char u1 = Character.toUpperCase(text.charAt(n+offset));
            char u2 = Character.toUpperCase(prefix.charAt(n));
            if (u1 != u2)
                return false;
        }
        
        return true;
    }
494057
private void checkPrefix(String prefix) {
    if (prefix.length() > 0) {
      // Make sure that prefix starts with a legal character.
      if (!contains(firstChars, prefix.charAt(0))) {
        char[] chars = new char[firstChars.length];
        for (int i = 0; i < chars.length; i++) {
          chars[i] = firstChars[i].name;
        }
        throw new IllegalArgumentException(
            "prefix must start with one of: " + Arrays.toString(chars));
      }
      for (int pos = 1; pos < prefix.length(); ++pos) {
        char[] chars = new char[nonFirstChars.length];
        for (int i = 0; i < chars.length; i++) {
          chars[i] = nonFirstChars[i].name;
        }
        if (!contains(nonFirstChars, prefix.charAt(pos))) {
          throw new IllegalArgumentException(
              "prefix has invalid characters, must be one of: "
              + Arrays.toString(chars));
        }
      }
    }
  }