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

Function substr

ext/strings.go:747–753  ·  view source on GitHub ↗
(str string, start int64)

Source from the content-addressed store, hash-verified

745}
746
747func substr(str string, start int64) (string, error) {
748 runes := []rune(str)
749 if int(start) < 0 || int(start) > len(runes) {
750 return "", fmt.Errorf("index out of range: %d", start)
751 }
752 return string(runes[start:]), nil
753}
754
755func substrRange(str string, start, end int64) (string, error) {
756 runes := []rune(str)

Callers 1

CompileOptionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected