MCPcopy Create free account
hub / github.com/brimdata/super / Call

Method Call

runtime/sam/expr/function/string.go:111–121  ·  view source on GitHub ↗
(args []super.Value)

Source from the content-addressed store, hash-verified

109}
110
111func (t *Trim) Call(args []super.Value) super.Value {
112 val := args[0].Under()
113 if val.IsNull() {
114 return super.Null
115 }
116 if !val.IsString() {
117 return t.sctx.WrapError("trim: string arg required", val)
118 }
119 s := super.DecodeString(val.Bytes())
120 return super.NewString(strings.TrimSpace(s))
121}
122
123type Split struct {
124 sctx *super.Context

Callers

nothing calls this directly

Calls 7

DecodeStringFunction · 0.92
NewStringFunction · 0.92
UnderMethod · 0.80
IsNullMethod · 0.80
IsStringMethod · 0.80
WrapErrorMethod · 0.80
BytesMethod · 0.45

Tested by

no test coverage detected