Returns true if `str` starts with same string as `what`
185488
function string_starts_with(str, what) {
		return (str.substr(0, what.length) === what) ? true : false;
	}
747822
function startsWithAny(string, vector) {
  return _.any(vector.map(function (e) { return _str.startsWith(string, e); }));
}
809358
function substr($str,$start,$len=0) {
		if ($start<0)
			$start=$this->strlen($str)+$start;
		if (!$len)
			$len=$this->strlen($str)-$start;
		return preg_match('/^.{'.$start.'}(.{0,'.$len.'})/us',$str,$match)?
			$match[1]:FALSE;
	}
1110737
public static boolean isBlank(String str) {
		if (str == null) {
			return true;
		}
		int len = str.length();
		if (len == 0) {
			return true;
		}
		for (int i = 0; i < len; i++) {
			switch (str.charAt(i)) {
			case ' ':
			case '\t':
			case '\n':
			case '\r':
			// case '\b':
			// case '\f':
				break;
			default:
				return false;
			}
		}
		return true;
	}
1298994
function startsWith(src, target) {
  if (target && target.length > 0) {
    return (src.substr(0, target.length) === target);
  } else {
    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
1305788
private static boolean startsWith(List<?> list, List<?> other) {
    return list.size() >= other.size() && list.subList(0, other.size()).equals(other);
  }
1263747
function startsWith(text) {
    var i, arg;
    for (i = 1 ; i < arguments.length ; i++) {
        arg = arguments[i];
        if (text.substr(0, arg.length) == arg) return true;
    }
    return false;
}
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;
    }
625878
public function startsWith($str)
    {
        self::mustBeString($str, 'Searched starting string');

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

        return (boolean) preg_match("/^$str/", $this->value);
    }
880055
public static boolean isQuotedConstant(String str) {
        if (str == null || str.isEmpty()) {
            return false;
        }
        return (str.startsWith("\"") && str.endsWith("\""));
    }
1070518
public static int startsWith(String str, String[] arr)
    {
        if ( arr == null ) {
            return -1;
        }
        
        for ( int i = 0; i < arr.length; i++ ) {
            if ( arr[i].startsWith(str) ) {
                return i;
            }
        }
        
        return -1;
    }
1348855
def is_string(val):
    """"""
    try:
        basestring
    except NameError:
        return isinstance(val, str)
    return isinstance(val, basestring)
896080
private boolean exactMatch(String str, int i) {
    int end = str.length() - i;
    for (String p : _patterns) {
      int start = end - p.length();
      if (start >= 0 && str.regionMatches(start, p, 0, p.length())) {
        return true;
      }
    }
    return false;
  }
1317062
public static boolean startsWithUppercase(String str) {
    if (isEmpty(str)) {
      return false;
    }
    return Character.isUpperCase(str.charAt(0));
  }
229663
private static boolean startsWith(String[] left, List<String> right) {
    // short circuit if a match isn't possible
    if (left.length < right.size()) {
      return false;
    }

    for (int i = 0; i < right.size(); i += 1) {
      if (!left[i].equals(right.get(i))) {
        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;
    }