From: Attila Molnar Date: Mon, 22 Aug 2016 14:30:02 +0000 (+0200) Subject: Remove unused trim() function X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=0424d98e0e6cbf139da4209aaacfd5585308f0ba;hp=2df0de3c9212f7ea74fcb9a0ccf20990e47e9f2e;p=user%2Fhenk%2Fcode%2Finspircd.git Remove unused trim() function --- diff --git a/include/hashcomp.h b/include/hashcomp.h index 87b2636fc..7f6956bfc 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -427,17 +427,3 @@ inline std::string assign(const irc::string &other) { return other.c_str(); } /** Assign a std::string to an irc::string. */ inline irc::string assign(const std::string &other) { return other.c_str(); } - -/** Trim the leading and trailing spaces from a std::string. - */ -inline std::string& trim(std::string &str) -{ - std::string::size_type start = str.find_first_not_of(" "); - std::string::size_type end = str.find_last_not_of(" "); - if (start == std::string::npos || end == std::string::npos) - str = ""; - else - str = str.substr(start, end-start+1); - - return str; -}