X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fhashcomp.h;h=94c222e14f0b6f59766108f8098a83fb0e6ff6f8;hb=780757cbc172daa4d9973e8e3b87fd42cfac5541;hp=e4b3cfe79e1de86279bfd866b6b98480535746b1;hpb=11cafc12d5440b67a9f676c9f6aa67840ca5399d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/hashcomp.h b/include/hashcomp.h index e4b3cfe79..94c222e14 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -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 > string; @@ -279,7 +277,7 @@ namespace irc * mode changes to be obtained. */ int GetStackedLine(std::vector &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); - - } -}