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

Function remove_suffix

common/arena_string.h:197–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 }
196
197 void remove_suffix(size_type n) {
198 ABSL_DCHECK_LE(n, size());
199
200 switch (rep_.kind) {
201 case common_internal::ArenaStringKind::kSmall:
202 rep_.small.size = rep_.small.size - n;
203 break;
204 case common_internal::ArenaStringKind::kLarge:
205 rep_.large.size = rep_.large.size - n;
206 break;
207 }
208 }
209
210 const_iterator begin() const ABSL_ATTRIBUTE_LIFETIME_BOUND { return data(); }
211

Callers

nothing calls this directly

Calls 1

sizeFunction · 0.70

Tested by

no test coverage detected