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

Method Call

runtime/vam/expr/function/string.go:197–211  ·  view source on GitHub ↗
(args ...vector.Any)

Source from the content-addressed store, hash-verified

195}
196
197func (t *ToLower) Call(args ...vector.Any) vector.Any {
198 if vec, ok := expr.CheckForNullThenError(args); ok {
199 return vec
200 }
201 v := vector.Under(args[0])
202 if v.Type() != super.TypeString {
203 return vector.NewWrappedError(t.sctx, "lower: string arg required", v)
204 }
205 out := vector.NewStringEmpty(v.Len())
206 for i := uint32(0); i < v.Len(); i++ {
207 s := vector.StringValue(v, i)
208 out.Append(strings.ToLower(s))
209 }
210 return out
211}
212
213type ToUpper struct {
214 sctx *super.Context

Callers

nothing calls this directly

Calls 8

CheckForNullThenErrorFunction · 0.92
UnderFunction · 0.92
NewWrappedErrorFunction · 0.92
NewStringEmptyFunction · 0.92
StringValueFunction · 0.92
TypeMethod · 0.65
LenMethod · 0.65
AppendMethod · 0.45

Tested by

no test coverage detected