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

Method MakePathForWikipedia

generator/descriptions_section_builder.cpp:128–137  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

126
127// static
128std::string DescriptionsCollector::MakePathForWikipedia(std::string const & wikipediaDir, std::string wikipediaUrl)
129{
130 strings::Trim(wikipediaUrl);
131 strings::ReplaceFirst(wikipediaUrl, "http://", "");
132 strings::ReplaceFirst(wikipediaUrl, "https://", "");
133 if (wikipediaUrl.ends_with('/'))
134 wikipediaUrl.pop_back();
135
136 return base::JoinPath(wikipediaDir, wikipediaUrl);
137}
138
139// static
140std::string DescriptionsCollector::MakePathForWikidata(std::string const & wikipediaDir, std::string const & wikidataId)

Callers

nothing calls this directly

Calls 4

TrimFunction · 0.85
ReplaceFirstFunction · 0.85
JoinPathFunction · 0.85
pop_backMethod · 0.45

Tested by

no test coverage detected