]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/hashcomp.h
Deduplicate hex string creation code
[user/henk/code/inspircd.git] / include / hashcomp.h
index e4b3cfe79e1de86279bfd866b6b98480535746b1..94c222e14f0b6f59766108f8098a83fb0e6ff6f8 100644 (file)
@@ -109,6 +109,11 @@ namespace irc
                bool operator()(const std::string& s1, const std::string& s2) const;
        };
 
+       struct insensitive
+       {
+               size_t CoreExport operator()(const std::string &s) const;
+       };
+
        /** The irc_char_traits class is used for RFC-style comparison of strings.
         * This class is used to implement irc::string, a case-insensitive, RFC-
         * comparing string class.
@@ -154,13 +159,6 @@ namespace irc
                static CoreExport const char* find(const char* s1, int  n, char c);
        };
 
-       /** Compose a hex string from raw data.
-        * @param raw The raw data to compose hex from
-        * @param rawsz The size of the raw data buffer
-        * @return The hex string.
-        */
-       CoreExport std::string hex(const unsigned char *raw, size_t rawsz);
-
        /** This typedef declares irc::string based upon irc_char_traits.
         */
        typedef std::basic_string<char, irc_char_traits, std::allocator<char> > string;
@@ -279,7 +277,7 @@ namespace irc
                 * mode changes to be obtained.
                 */
                int GetStackedLine(std::vector<std::string> &result, int max_line_size = 360);
-               
+
        };
 
        /** irc::tokenstream reads a string formatted as per RFC1459 and RFC2812.
@@ -472,12 +470,6 @@ namespace irc
                long GetToken();
        };
 
-       /** Turn _ characters in a string into spaces
-        * @param n String to translate
-        * @return The new value with _ translated to space.
-        */
-       CoreExport const char* Spacify(const char* n);
-
        struct hash
        {
                /** Hash an irc::string using RFC1459 case sensitivity rules
@@ -581,21 +573,3 @@ inline std::string& trim(std::string &str)
 
        return str;
 }
-
-namespace std
-{
-       namespace tr1
-       {
-               
-               struct insensitive
-               {
-                       size_t CoreExport operator()(const std::string &s) const;
-               };
-               
-        /** Convert a string to lower case respecting RFC1459
-        * @param n A string to lowercase
-        */
-        void strlower(char *n);
-               
-       }
-}