MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Strings

Function Strings

ext/strings.go:318–326  ·  view source on GitHub ↗

Strings returns a cel.EnvOption to configure extended functions for string manipulation. As a general note, all indices are zero-based. # CharAt Introduced at version: 0 (cost support in version 5) Returns the character at the given position. If the position is negative, or greater than the lengt

(options ...StringsOption)

Source from the content-addressed store, hash-verified

316//
317// <string>.format(<list>) -> <string>
318func Strings(options ...StringsOption) cel.EnvOption {
319 s := &stringLib{
320 version: math.MaxUint32,
321 }
322 for _, o := range options {
323 s = o(s)
324 }
325 return cel.Lib(s)
326}
327
328type stringLib struct {
329 locale string

Callers 15

bench.goFile · 0.92
initFunction · 0.92
evaluator.goFile · 0.92
TestStringFormatFunction · 0.85
TestBadLocaleFunction · 0.85
TestLiteralOutputFunction · 0.85
TestStringFormatV2Function · 0.85
TestBindingsFunction · 0.85

Calls 1

LibFunction · 0.92

Tested by 15

initFunction · 0.74
TestStringFormatFunction · 0.68
TestBadLocaleFunction · 0.68
TestLiteralOutputFunction · 0.68
TestStringFormatV2Function · 0.68
TestBindingsFunction · 0.68
TestBindingsNonMatchFunction · 0.68
TestBindingsInvalidIdentFunction · 0.68
BenchmarkBindingsFunction · 0.68