- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for trimStrings (0.43 sec)
-
src/net/textproto/textproto.go
id = c.Next() c.StartRequest(id) err = c.PrintfLine(format, args...) c.EndRequest(id) if err != nil { return 0, err } return id, nil } // TrimString returns s without leading and trailing ASCII space. func TrimString(s string) string { for len(s) > 0 && isASCIISpace(s[0]) { s = s[1:] } for len(s) > 0 && isASCIISpace(s[len(s)-1]) { s = s[:len(s)-1] } return s }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 3.7K bytes - Viewed (0) -
src/net/http/httptest/recorder.go
if trailers, ok := rw.snapHeader["Trailer"]; ok { res.Trailer = make(http.Header, len(trailers)) for _, k := range trailers { for _, k := range strings.Split(k, ",") { k = http.CanonicalHeaderKey(textproto.TrimString(k)) if !httpguts.ValidTrailerHeader(k) { // Ignore since forbidden by RFC 7230, section 4.1.2. continue } vv, ok := rw.HeaderMap[k] if !ok { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 7K bytes - Viewed (0) -
src/cmd/vendor/rsc.io/markdown/code.go
case '`', '~': f := t.string() n := 0 for i := 0; ; i++ { if !t.trim(c) { if i >= 3 { break } return false } n++ } txt := mdUnescaper.Replace(t.trimString()) if c == '`' && strings.Contains(txt, "`") { return false } txt = trimSpaceTab(txt) *info = txt *fence = f[:n] *s = line{} return true } return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 13:01:26 UTC 2024 - 4.8K bytes - Viewed (0) -
src/net/http/header.go
// way to provide the error back to the server // handler, so just drop invalid headers instead. continue } for _, v := range kv.values { v = headerNewlineToSpace.Replace(v) v = textproto.TrimString(v) for _, s := range []string{kv.key, ": ", v, "\r\n"} { if _, err := ws.WriteString(s); err != nil { headerSorterPool.Put(sorter) return err } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 22:14:00 UTC 2024 - 7.6K bytes - Viewed (0)