[core] Remove private header includes from CLI utilities

This commit is contained in:
Konstantin Käfer
2017-03-21 14:41:08 +01:00
parent 9b39013ce4
commit 68e032e505
7 changed files with 8 additions and 44 deletions

View File

@@ -66,19 +66,6 @@ std::string percentDecode(const std::string& input) {
return decoded;
}
// Checks whether the input string contains ://, and the part before it is all alphanumeric ASCII.
bool isURL(const std::string& input) {
auto it = input.begin();
// First character has to be alphabetic
if (it == input.end() || !isAlphaCharacter(*it++)) return false;
// The remaining characters of the scheme can be alphanumeric, or be one of +.-
while (it != input.end() && isSchemeCharacter(*it)) ++it;
// Check that :// follows
return (it != input.end() && *it++ == ':') &&
(it != input.end() && *it++ == '/') &&
(it != input.end() && *it++ == '/');
}
URL::URL(const std::string& str)
: query([&]() -> Segment {
const auto hashPos = str.find('#');

View File

@@ -8,7 +8,6 @@ namespace util {
std::string percentEncode(const std::string&);
std::string percentDecode(const std::string&);
bool isURL(const std::string&);
// Class that holds position + lenth pairs for scheme, domain, path + query string of a URL.
class URL {