diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 17:11:38 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-08-22 17:11:38 +0200 |
commit | 200062cd5e17bb3be02eb2a6fe593c9d4bfc763e (patch) | |
tree | 66c67655338bbb1ed34499279ffc38c6fa180e4b /include | |
parent | 541af0b0a2158a2ca22fa923ff9143800477d2fc (diff) |
Remove now unused SearchAndReplace() function
Diffstat (limited to 'include')
-rw-r--r-- | include/hashcomp.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h index 464fb16de..ddd590db2 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -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 |