+std::string VisualUrl::GetLocationWithoutExtension(const std::string& url)
+{
+ const auto location = url.find("://");
+ if(std::string::npos != location)
+ {
+ const auto extension = url.find_last_of("."); // Find last position of '.' keyword.
+ const auto locationLength = extension != std::string::npos ? extension - (location + 3u) : std::string::npos;
+ return url.substr(location + 3u, locationLength); // 3 characters forwards from the start of ://, and end of last '.' keyword.
+ }
+ return url;
+}
+