MCPcopy Create free account
hub / github.com/araddon/qlbridge / titleCaseEval

Function titleCaseEval

expr/builtins/string.go:105–111  ·  view source on GitHub ↗
(ctx expr.EvalContext, args []value.Value)

Source from the content-addressed store, hash-verified

103 return titleCaseEval, nil
104}
105func 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//

Callers

nothing calls this directly

Calls 2

ValueToStringFunction · 0.92
NewStringValueFunction · 0.92

Tested by

no test coverage detected