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

Function FillPrefixLengthToSuggest

libs/indexer/categories_holder.cpp:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void FillPrefixLengthToSuggest(CategoriesHolder::Category::Name & name)
56{
57 if (std::isdigit(name.m_name.front()) && name.m_name.front() != '0')
58 {
59 name.m_prefixLengthToSuggest = name.m_name[0] - '0';
60 name.m_name = name.m_name.substr(1);
61 }
62 else
63 {
64 name.m_prefixLengthToSuggest = CategoriesHolder::Category::kEmptyPrefixLength;
65 }
66}
67
68void ProcessName(CategoriesHolder::Category::Name name, std::vector<std::string> const & groups,
69 std::vector<uint32_t> const & types, CategoriesHolder::GroupTranslations & translations,

Callers 1

ProcessNameFunction · 0.85

Calls 1

frontMethod · 0.80

Tested by

no test coverage detected