func strings.Cut
34 uses
strings (current package)
strings.go#L1278: func Cut(s, sep string) (before, after string, found bool) {
crypto/x509
pem_decrypt.go#L130: mode, hexIV, ok := strings.Cut(dek, ",")
encoding/asn1
common.go#L97: part, str, _ = strings.Cut(str, ",")
encoding/json
tags.go#L18: tag, opt, _ := strings.Cut(tag, ",")
tags.go#L32: name, s, _ = strings.Cut(s, ",")
mime
encodedword.go#L207: charset, text, _ := strings.Cut(word, "?")
encodedword.go#L211: encoding, text, _ := strings.Cut(text, "?")
mediatype.go#L22: if major, sub, ok := strings.Cut(t, "/"); !ok {
mediatype.go#L140: base, _, _ := strings.Cut(v, ";")
mediatype.go#L173: if baseName, _, ok := strings.Cut(key, "*"); ok {
net/http
cookie.go#L72: name, value, ok := strings.Cut(parts[0], "=")
cookie.go#L95: attr, val, _ := strings.Cut(parts[i], "=")
cookie.go#L289: part, line, _ = strings.Cut(line, ";")
cookie.go#L294: name, val, _ := strings.Cut(part, "=")
fs.go#L902: start, end, ok := strings.Cut(ra, "-")
request.go#L969: username, password, ok = strings.Cut(cs, ":")
request.go#L993: method, rest, ok1 := strings.Cut(line, " ")
request.go#L994: requestURI, proto, ok2 := strings.Cut(rest, " ")
response.go#L168: proto, status, ok := strings.Cut(line, " ")
response.go#L175: statusCode, _, _ := strings.Cut(resp.Status, " ")
transport.go#L1747: _, text, ok := strings.Cut(resp.Status, " ")
net/url
url.go#L468: u, frag, _ := strings.Cut(rawURL, "#")
url.go#L528: rest, url.RawQuery, _ = strings.Cut(rest, "?")
url.go#L547: if segment, _, _ := strings.Cut(rest, "/"); strings.Contains(segment, ":") {
url.go#L602: username, password, _ := strings.Cut(userinfo, ":")
url.go#L844: if segment, _, _ := strings.Cut(path, "/"); strings.Contains(segment, ":") {
url.go#L935: key, query, _ = strings.Cut(query, "&")
url.go#L943: key, value, _ := strings.Cut(key, "=")
url.go#L1016: elem, remaining, found = strings.Cut(remaining, "/")
path/filepath
path.go#L198: part, p, _ = strings.Cut(p, "/")
regexp
regexp.go#L934: before, after, ok := strings.Cut(template, "$")
regexp/syntax
parse.go#L1038: lit, t, _ = strings.Cut(t[2:], `\E`)
runtime/debug
mod.go#L191: line, data, ok = strings.Cut(data, newline)
mod.go#L255: key, rawValue, ok = strings.Cut(kv, "=")
|
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |