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

Function TryStripPrefixString

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

Source from the content-addressed store, hash-verified

28}
29
30bool TryStripPrefixString(StringPiece str, const StringPiece& prefix,
31 string* result) {
32 const bool has_prefix = str.starts_with(prefix);
33 if (has_prefix)
34 str.remove_prefix(prefix.length());
35 str.as_string().swap(*result);
36 return has_prefix;
37}
38
39string StripSuffixString(StringPiece str, const StringPiece& suffix) {
40 if (str.ends_with(suffix))

Callers 7

headersDoneMethod · 0.85
NegotiateAuthFunction · 0.85
AuthenticateCookieFunction · 0.85
RunSpnegoStepFunction · 0.85
HandleBasicMethod · 0.85

Calls 5

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

Tested by

no test coverage detected