[core] Remove private header includes from CLI utilities
This commit is contained in:
@@ -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('#');
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user