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

Function CommaSeparatedContains

be/src/util/string-util.cc:61–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61bool CommaSeparatedContains(const std::string& cs_list, const std::string& item) {
62 size_t pos = 0;
63 while (pos < cs_list.size()) {
64 size_t comma_pos = cs_list.find(',', pos);
65 if (comma_pos == string::npos) return cs_list.compare(pos, string::npos, item) == 0;
66 if (cs_list.compare(pos, comma_pos - pos, item) == 0) return true;
67 pos = comma_pos + 1;
68 }
69 return false;
70}
71
72bool EndsWith(const std::string& full_string, const std::string& end) {
73 if (full_string.size() >= end.size()) {

Callers 2

CheckPluginEnabledMethod · 0.85
TESTFunction · 0.85

Calls 3

compareMethod · 0.65
sizeMethod · 0.45
findMethod · 0.45

Tested by 1

TESTFunction · 0.68