diff options
author | lloyd <[email protected]> | 2006-06-19 09:20:23 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-06-19 09:20:23 +0000 |
commit | 69ca3d65b82ab041e8df85ca3f4e63e669557607 (patch) | |
tree | 23005899d23998ada689d4babd2bfccb4d520dbe /src/x509find.cpp | |
parent | 6413b5d29a781a231d2f331e4191b68fb88a27d9 (diff) |
Remove the to_lower function; turns out that both uses of it
within the library were to perform case-insensitive matching, so
simply implement that instead.
Place all of the character set handling functions into a Charset
namespace (and update all callers).
Remove the iso2local/local2iso/iso2utf/utf2iso functions, replaced
by the new charset transcoder stuff.
Initialize the transcoder stored in the global library state
upon initialization.
Diffstat (limited to 'src/x509find.cpp')
-rw-r--r-- | src/x509find.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/x509find.cpp b/src/x509find.cpp index 2ba430caf..f78c037b5 100644 --- a/src/x509find.cpp +++ b/src/x509find.cpp @@ -20,21 +20,13 @@ namespace { typedef bool (*compare_fn)(const std::string&, const std::string&); /************************************************* -* Predicate for caseless searching * -*************************************************/ -bool caseless_cmp(char a, char b) - { - return (to_lower(a) == to_lower(b)); - } - -/************************************************* * Compare based on case-insensive substrings * *************************************************/ bool substring_match(const std::string& searching_for, const std::string& found) { if(std::search(found.begin(), found.end(), searching_for.begin(), - searching_for.end(), caseless_cmp) != found.end()) + searching_for.end(), Charset::caseless_cmp) != found.end()) return true; return false; } @@ -48,7 +40,7 @@ bool ignore_case(const std::string& searching_for, const std::string& found) return false; return std::equal(found.begin(), found.end(), - searching_for.begin(), caseless_cmp); + searching_for.begin(), Charset::caseless_cmp); } /************************************************* |