MCPcopy Create free account
hub / github.com/comaps/comaps / MakeQueryString

Function MakeQueryString

libs/search/string_utils.cpp:12–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10{
11
12QueryString MakeQueryString(std::string s)
13{
14 QueryString qs;
15 qs.m_query = std::move(s);
16
17 Delimiters delims;
18 auto const uniString = NormalizeAndSimplifyString(qs.m_query);
19 SplitUniString(uniString, base::MakeBackInsertFunctor(qs.m_tokens), delims);
20
21 if (!qs.m_tokens.empty() && !delims(uniString.back()))
22 {
23 qs.m_prefix = qs.m_tokens.back();
24 qs.m_tokens.pop_back();
25 }
26
27 return qs;
28}
29
30} // namespace search

Callers 3

InitMatcherFunction · 0.85
CreateMatcherFunction · 0.85
UNIT_TESTFunction · 0.85

Calls 6

SplitUniStringFunction · 0.85
MakeBackInsertFunctorFunction · 0.85
backMethod · 0.80
emptyMethod · 0.45
pop_backMethod · 0.45

Tested by 3

InitMatcherFunction · 0.68
CreateMatcherFunction · 0.68
UNIT_TESTFunction · 0.68