(ctx expr.EvalContext, args []value.Value)
| 59 | return lowerCaseEval, nil |
| 60 | } |
| 61 | func lowerCaseEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { |
| 62 | val, ok := value.ValueToString(args[0]) |
| 63 | if !ok { |
| 64 | return value.EmptyStringValue, false |
| 65 | } |
| 66 | return value.NewStringValue(strings.ToLower(val)), true |
| 67 | } |
| 68 | |
| 69 | // UpperCase take a string and uppercase it. must be able to convert to string. |
| 70 | // |
nothing calls this directly
no test coverage detected