Skip to content
Snippets Groups Projects
Commit ab261442 authored by Odilitime's avatar Odilitime
Browse files

getProtocolFromURL => getSchemeFromURL

parent cf45df19
No related branches found
No related tags found
No related merge requests found
......@@ -57,11 +57,11 @@ const std::string getHostFromURL(const std::string &url) {
}
/**
* get protocol from a url
* get scheme from a url
* @param url url string
* @return '' or a string with the found protocol
*/
const std::string getProtocolFromURL(const std::string &url) {
const std::string getSchemeFromURL(const std::string &url) {
auto colonDoubleSlash = url.find("://");
if (colonDoubleSlash != std::string::npos) {
return url.substr(0, colonDoubleSlash);
......
......@@ -2,11 +2,12 @@
#define STRINGUTILS_H
#include <string>
const std::string toLowercase(const std::string &str);
// should be moved to URL
const std::string getFilenameExtension(std::string const& fileName);
const std::string getDocumentFromURL(const std::string &url);
const std::string getHostFromURL(const std::string &url);
const std::string getProtocolFromURL(const std::string &url);
const std::string toLowercase(const std::string &str);
const std::string getSchemeFromURL(const std::string &url);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment