MCPcopy Create free account
hub / github.com/apache/impala / StripPrefixString

Function StripPrefixString

be/src/gutil/strings/strip.cc:24–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#include "gutil/strings/stringpiece.h"
23
24string StripPrefixString(StringPiece str, const StringPiece& prefix) {
25 if (str.starts_with(prefix))
26 str.remove_prefix(prefix.length());
27 return str.as_string();
28}
29
30bool TryStripPrefixString(StringPiece str, const StringPiece& prefix,
31 string* result) {

Callers 1

HasGoodGdbMethod · 0.85

Calls 4

starts_withMethod · 0.80
remove_prefixMethod · 0.80
as_stringMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected