From a8fbfafb9f0683fe1344a1f59ff83ee56577c934 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Wed, 28 Nov 2007 19:40:04 +0100 Subject: - speedup --- epgsearchtools.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/epgsearchtools.h b/epgsearchtools.h index 325b25c..3ca85c4 100644 --- a/epgsearchtools.h +++ b/epgsearchtools.h @@ -151,4 +151,41 @@ public: } }; +// --- icstring ------------------------------------------ +// a case-insensitive string class + +struct ignorecase_traits : public std::char_traits { + // return whether c1 and c2 are equal + static bool eq(const char& c1, const char& c2) { + return (c1==c2 || std::toupper(c1)==std::toupper(c2)); + } + // return whether c1 is less than c2 + static bool lt(const char& c1, const char& c2) { + return std::toupper(c1) icstring; + #endif -- cgit v1.2.3