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

Function remove_prefix

common/arena_string.h:182–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 }
181
182 void remove_prefix(size_type n) {
183 ABSL_DCHECK_LE(n, size());
184
185 switch (rep_.kind) {
186 case common_internal::ArenaStringKind::kSmall:
187 std::memmove(rep_.small.data, rep_.small.data + n, rep_.small.size - n);
188 rep_.small.size = rep_.small.size - n;
189 break;
190 case common_internal::ArenaStringKind::kLarge:
191 rep_.large.data += n;
192 rep_.large.size = rep_.large.size - n;
193 break;
194 }
195 }
196
197 void remove_suffix(size_type n) {
198 ABSL_DCHECK_LE(n, size());

Callers

nothing calls this directly

Calls 1

sizeFunction · 0.70

Tested by

no test coverage detected