MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / LastIndexOf3

Function LastIndexOf3

extensions/strings.cc:131–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131Value LastIndexOf3(const StringValue& haystack, const StringValue& needle,
132 int64_t pos) {
133 if (pos < 0 || pos > haystack.Size()) {
134 return ErrorValue{
135 absl::InvalidArgumentError(absl::StrCat("index out of range: ", pos))};
136 }
137 return IntValue(haystack.LastIndexOf(needle, pos).value_or(-1));
138}
139
140Value Substring2(const StringValue& string, int64_t start) {
141 return string.Substring(start);

Callers

nothing calls this directly

Calls 3

LastIndexOfMethod · 0.80
IntValueClass · 0.50
SizeMethod · 0.45

Tested by

no test coverage detected