summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-12-05 22:50:33 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-09 23:55:25 +0100
commitf405849b49614254f42eb3ee6147434458978623 (patch)
treeecf06af8ba1b049504957d4e2797ead26c81ec3e /src/utils/stringutils.h
parentf5172d4fcc10be73b72c1033cf9357a4dfe3544d (diff)
downloadmana-f405849b49614254f42eb3ee6147434458978623.tar.gz
mana-f405849b49614254f42eb3ee6147434458978623.tar.bz2
mana-f405849b49614254f42eb3ee6147434458978623.tar.xz
mana-f405849b49614254f42eb3ee6147434458978623.zip
Made the client able to remove the port from update urls.
Resolves: Mana-Mantis #381. Reviewed-by: Ablu.
Diffstat (limited to 'src/utils/stringutils.h')
-rw-r--r--src/utils/stringutils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h
index 2c6fad78..3ef4d513 100644
--- a/src/utils/stringutils.h
+++ b/src/utils/stringutils.h
@@ -149,4 +149,15 @@ std::string autocomplete(std::vector<std::string> &candidates,
*/
std::string normalize(const std::string &name);
+/**
+ * Remove a potential trailing symbol from a string.
+ */
+std::string removeTrailingSymbol(const std::string& s, const char c);
+
+/**
+ * Gets the hostname out of the given URL.
+ * i.e.: http://www.manasource.org:9601 -> www.manasource.org
+ */
+std::string getHostNameFromURL(const std::string& url);
+
#endif // UTILS_STRINGUTILS_H