]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/hashcomp.h
Remove now unused SearchAndReplace() function
[user/henk/code/inspircd.git] / include / hashcomp.h
index 464fb16deddb36513fcd74fc4b0dd9c5b5be6d11..ddd590db2689e255cfbd84a9d95e71e555973be2 100644 (file)
@@ -70,29 +70,6 @@ CoreExport extern unsigned const char ascii_case_insensitive_map[256];
  */
 CoreExport extern unsigned const char rfc_case_sensitive_map[256];
 
-template<typename T> const T& SearchAndReplace(T& text, const T& pattern, const T& replace)
-{
-       T 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)
-                       {
-                               // Found the pattern in the text, replace it, and advance
-                               replacement.append(replace);
-                               n = n + pattern.length() - 1;
-                       }
-                       else
-                       {
-                               replacement += text[n];
-                       }
-               }
-       }
-       text = replacement;
-       return text;
-}
-
 /** The irc namespace contains a number of helper classes.
  */
 namespace irc