MCPcopy
hub / github.com/flosch/pongo2 / filterCapfirst

Function filterCapfirst

filters_builtin.go:530–537  ·  view source on GitHub ↗
(in *Value, param *Value)

Source from the content-addressed store, hash-verified

528}
529
530func filterCapfirst(in *Value, param *Value) (*Value, *Error) {
531 if in.Len() <= 0 {
532 return AsValue(""), nil
533 }
534 t := in.String()
535 r, size := utf8.DecodeRuneInString(t)
536 return AsValue(strings.ToUpper(string(r)) + t[size:]), nil
537}
538
539func filterCenter(in *Value, param *Value) (*Value, *Error) {
540 width := param.Integer()

Callers

nothing calls this directly

Calls 3

AsValueFunction · 0.85
LenMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…