X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fhashcomp.cpp;h=ab4d8368ddbb42a0f3351d4408d4d37132c4b08a;hb=56c4074af5b848b10623f6bcc63da188038ad037;hp=a613a8073eab57502847d10326a65e883a8aa8c5;hpb=4579758c8f9051cf87b5bf06ba12e6125104d0eb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index a613a8073..ab4d8368d 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -2,11 +2,11 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * InspIRCd: (C) 2002-2009 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see - * the file COPYING for details. + * the file COPYING for details. * * --------------------------------------------------- */ @@ -501,3 +501,25 @@ long irc::portparser::GetToken() } } +/*const std::basic_string& SearchAndReplace(std::string& text, const std::string& pattern, const std::string& replace) +{ + std::string replacement; + if ((!pattern.empty()) && (!text.empty())) + { + for (std::string::size_type n = 0; n != text.length(); ++n) + { + if (text.length() >= pattern.length() && text.substr(n, pattern.length()) == pattern) + { + replacement.append(replace); + n = n + pattern.length() - 1; + } + else + { + replacement += text[n]; + } + } + } + text = replacement; + return text; +}*/ +