(args ...vector.Any)
| 195 | } |
| 196 | |
| 197 | func (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 | |
| 213 | type ToUpper struct { |
| 214 | sctx *super.Context |
nothing calls this directly
no test coverage detected