(ctx expr.EvalContext, args []value.Value)
| 103 | return titleCaseEval, nil |
| 104 | } |
| 105 | func titleCaseEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { |
| 106 | val, ok := value.ValueToString(args[0]) |
| 107 | if !ok { |
| 108 | return value.EmptyStringValue, false |
| 109 | } |
| 110 | return value.NewStringValue(strings.Title(val)), true |
| 111 | } |
| 112 | |
| 113 | // Split a string with given separator |
| 114 | // |
nothing calls this directly
no test coverage detected