func strings.HasPrefix
86 uses
strings (current package)
replace.go#L246: } else if node.prefix != "" && HasPrefix(s, node.prefix) {
search.go#L73: if HasPrefix(pattern, pattern[i+1:]) {
strings.go#L444: func HasPrefix(s, prefix string) bool {
strings.go#L903: if HasPrefix(s, prefix) {
crypto/x509
verify.go#L453: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") ||
encoding/asn1
common.go#L125: case strings.HasPrefix(part, "default:"):
common.go#L131: case strings.HasPrefix(part, "tag:"):
mime
encodedword.go#L201: if len(word) < 8 || !strings.HasPrefix(word, "=?") || !strings.HasSuffix(word, "?=") || strings.Count(word, "?") != 4 {
mediatype.go#L112: if !strings.HasPrefix(rest, "/") {
mediatype.go#L328: if !strings.HasPrefix(rest, ";") {
mediatype.go#L341: if !strings.HasPrefix(rest, "=") {
type.go#L165: if !strings.HasPrefix(ext, ".") {
type.go#L177: if strings.HasPrefix(mimeType, "text/") && param["charset"] == "" {
net/http
fs.go#L347: if strings.HasPrefix(s, "W/") {
fs.go#L844: if !strings.HasPrefix(upath, "/") {
fs.go#L874: if !strings.HasPrefix(s, b) {
h2_bundle.go#L2746: isPseudo := strings.HasPrefix(hf.Name, ":")
h2_bundle.go#L6115: if !strings.HasPrefix(k, http2TrailerPrefix) {
h2_bundle.go#L6326: if !strings.HasPrefix(target, "/") {
h2_bundle.go#L6340: if strings.HasPrefix(k, ":") {
h2_bundle.go#L6960: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
request.go#L767: if !strings.HasPrefix(host, "[") {
request.go#L791: if !strings.HasPrefix(vers, "HTTP/") {
request.go#L1059: justAuthority := req.Method == "CONNECT" && !strings.HasPrefix(rawurl, "/")
server.go#L506: if strings.HasPrefix(k, TrailerPrefix) {
server.go#L1125: if !strings.HasPrefix(frame.Function, "net/http.") {
server.go#L1261: if strings.HasPrefix(k, TrailerPrefix) {
server.go#L2286: if len(p) == len(np)+1 && strings.HasPrefix(p, np) {
server.go#L2320: if strings.HasPrefix(path, e.pattern) {
net/url
url.go#L540: if !strings.HasPrefix(rest, "/") {
url.go#L564: if (url.Scheme != "" || !viaRequest && !strings.HasPrefix(rest, "///")) && strings.HasPrefix(rest, "//") {
url.go#L620: if strings.HasPrefix(host, "[") {
url.go#L1124: if strings.HasPrefix(result, "//") {
url.go#L1162: if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
path/filepath
path_unix.go#L13: return strings.HasPrefix(path, "/")
path_unix.go#L27: return strings.HasPrefix(p, prefix)
regexp
regexp.go#L399: return strings.HasPrefix(i.str, re.prefix)
runtime/debug
mod.go#L79: case strings.HasPrefix(line, pathLine):
mod.go#L82: case strings.HasPrefix(line, modLine):
mod.go#L89: case strings.HasPrefix(line, depLine):
mod.go#L97: case strings.HasPrefix(line, repLine):
runtime/pprof
pprof.go#L501: } else if name != "runtime.goexit" && (show || !strings.HasPrefix(name, "runtime.")) {
protomem.go#L38: if f := runtime.FuncForPC(addr); f != nil && strings.HasPrefix(f.Name(), "runtime.") {
src.elv.sh/pkg/cli/histutil
db.go#L85: if strings.HasPrefix(s.cmds[i], prefix) {
db.go#L100: if strings.HasPrefix(s.cmds[i], prefix) {
mem_store.go#L47: if strings.HasPrefix(c.cmds[c.index].Text, c.prefix) {
mem_store.go#L58: if strings.HasPrefix(c.cmds[c.index].Text, c.prefix) {
src.elv.sh/pkg/cli/lscolors
lscolors.go#L102: if strings.HasPrefix(key, "*.") {
src.elv.sh/pkg/cli/mode
lastcmd.go#L102: negFilter := strings.HasPrefix(p, "-")
lastcmd.go#L104: if (negFilter && strings.HasPrefix(entry.negIndex, p)) ||
lastcmd.go#L105: (!negFilter && strings.HasPrefix(entry.posIndex, p)) {
location.go#L103: if strings.HasPrefix(path, wsKind) {
location.go#L122: strings.HasPrefix(path, prefix+string(filepath.Separator))
location.go#L136: if !strings.HasPrefix(pattern, "^") {
src.elv.sh/pkg/edit
complete_getopt.go#L171: if strings.HasPrefix(opt.Long, ctx.Text) {
completion.go#L186: if len(prefix) > len(rep) && strings.HasPrefix(prefix, rep) {
completion.go#L237: "match-prefix": wrapMatcher(strings.HasPrefix),
config_api.go#L75: func(s string) bool { return !strings.HasPrefix(s, " ") })
src.elv.sh/pkg/edit/complete
completers.go#L218: return len(s) > len(p) && strings.HasPrefix(s, p)
filterers.go#L10: if strings.HasPrefix(cand.String(), seed) {
generators.go#L59: if strings.HasPrefix(seed, "e:") {
generators.go#L162: return strings.HasPrefix(fname, ".")
src.elv.sh/pkg/edit/highlight
regions.go#L249: case strings.HasPrefix(trimmed, "#"):
src.elv.sh/pkg/eval
builtin_special.go#L337: if strings.HasPrefix(spec, "./") || strings.HasPrefix(spec, "../") {
glob.go#L75: case strings.HasPrefix(modifier, "but:"):
glob.go#L85: case strings.HasPrefix(modifier, "type:"):
glob.go#L99: } else if strings.HasPrefix(modifier, "set:") {
glob.go#L104: } else if strings.HasPrefix(modifier, "range:") {
src.elv.sh/pkg/eval/mods/str
str.go#L578: "has-prefix": strings.HasPrefix,
src.elv.sh/pkg/eval/vals
string.go#L47: strings.HasPrefix(s, "0.0000") {
src.elv.sh/pkg/fsutil
claim.go#L46: if len(name) > len(prefix)+len(suffix) && strings.HasPrefix(name, prefix) && strings.HasSuffix(name, suffix) {
getwd.go#L33: } else if strings.HasPrefix(path, home+pathSep) {
src.elv.sh/pkg/getopt
getopt.go#L192: hasPrefix := func(p string) bool { return strings.HasPrefix(elem, p) }
src.elv.sh/pkg/parse
parser.go#L81: return strings.HasPrefix(ps.src[ps.pos:], prefix)
src.elv.sh/pkg/ui
color.go#L103: if strings.HasPrefix(name, "color") {
color.go#L108: } else if strings.HasPrefix(name, "#") && len(name) == 7 {
parse_sgr.go#L18: for strings.HasPrefix(st.text, sgrPrefix) {
styling.go#L186: case strings.HasPrefix(name, "fg-"):
styling.go#L192: case strings.HasPrefix(name, "bg-"):
styling.go#L196: case strings.HasPrefix(name, "no-"):
styling.go#L200: case strings.HasPrefix(name, "toggle-"):
vendor/golang.org/x/net/http/httpguts
guts.go#L22: if strings.HasPrefix(name, "If-") || badTrailer[name] {
vendor/golang.org/x/net/http/httpproxy
proxy.go#L262: if strings.HasPrefix(phost, "*.") {
vendor/golang.org/x/net/idna
idna10.0.0.go#L331: if strings.HasPrefix(label, acePrefix) {