summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 361bc860c..176c5499c 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -578,3 +578,11 @@ bool findCutFirst(std::string &str1, std::string str2)
}
return false;
}
+
+std::string &removeProtocol(std::string &url)
+{
+ int i = url.find("://");
+ if (i != (int)std::string::npos)
+ url = url.substr(i + 3);
+ return url;
+}