Lines Matching refs:url
13 // Get the host from an url
14 static std::string GetUrlHost(const std::string& url) {
15 size_t b = url.find("//");
20 size_t next_slash = url.find_first_of('/', b);
21 size_t next_colon = url.find_first_of(':', b);
25 return std::string(url, b, next_colon - b);
29 return std::string(url, next_colon - b);
31 next_slash = url.size();
34 return std::string(url, b, next_slash - b);
37 // Get the host + path portion of an url
40 static std::string GetUrlHostPath(const std::string& url) {
41 size_t b = url.find("//");
46 return std::string(url, b);
49 // Get the path portion of an url
52 static std::string GetUrlPath(const std::string& url) {
53 size_t b = url.find("//");
58 b = url.find("/", b+1);
62 return std::string(url, b);