MCPcopy Create free account
hub / github.com/kataras/iris / TrimHeaderValue

Function TrimHeaderValue

context/context.go:1159–1166  ·  view source on GitHub ↗

TrimHeaderValue returns the "v[0:first space or semicolon]".

(v string)

Source from the content-addressed store, hash-verified

1157
1158// TrimHeaderValue returns the "v[0:first space or semicolon]".
1159func TrimHeaderValue(v string) string {
1160 for i, char := range v {
1161 if char == ' ' || char == ';' {
1162 return v[:i]
1163 }
1164 }
1165 return v
1166}
1167
1168// GetHeader returns the request header's value based on its name.
1169func (ctx *Context) GetHeader(name string) string {

Callers 3

defaultResultHandlerFunction · 0.92
TypeByExtensionFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…