diff options
author | Adam <Adam@anope.org> | 2010-11-30 17:25:42 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:37:03 -0500 |
commit | a507816701d136a1c22d2f6779d811840d61577c (patch) | |
tree | 37e397d8e6d6f04685287b7ec3aa7d0662460da4 /include/hashcomp.h | |
parent | c41c82857464c34c61e6f2cf1939cea866f7d49a (diff) |
Fixed looking up users to use case insensitivity
Diffstat (limited to 'include/hashcomp.h')
-rw-r--r-- | include/hashcomp.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/hashcomp.h b/include/hashcomp.h index 8fb76bcd0..b99b97aa4 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -162,6 +162,12 @@ namespace irc * @return Pointer to the first occurance of c in s1 */ static const char *find(const char *s1, int n, char c); + + /** Convert a char to lowercase + * @param c1 The character to convert + * @return The lowercase version of the char + */ + static const char chartolower(char c1); }; /** This typedef declares irc::string based upon irc_char_traits. @@ -233,6 +239,12 @@ namespace ci * @return Pointer to the first occurance of c in s1 */ static const char *find(const char *s1, int n, char c); + + /** Convert a char to lowercase + * @param c1 The character to convert + * @return The lowercase version of the char + */ + static const char chartolower(char c1); }; /** This typedef declares ci::string based upon ci_char_traits. @@ -259,6 +271,17 @@ namespace ci namespace std { + /** The std_char_traits class is used for normal comparison of strings. + */ + struct CoreExport std_char_traits : char_traits<char> + { + /** Convert a char to lowercase + * @param c1 The character to convert + * @return The lowercase version of the char + */ + static const char chartolower(char c1); + }; + /** An overload for std::equal_to<ci::string> that uses Anope::string, passed for the fourth temmplate * argument for unordered_map */ |