| 129 | } |
| 130 | |
| 131 | Value 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 | |
| 140 | Value Substring2(const StringValue& string, int64_t start) { |
| 141 | return string.Substring(start); |
nothing calls this directly
no test coverage detected