Skip to content

Commit

Permalink
libcore: Added insensitive String comparator
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent e8e92c5 commit e8d2de7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doomsday/libs/core/include/de/data/string.h
Expand Up @@ -92,6 +92,17 @@ class DE_PUBLIC String : public IByteArray

typedef List<const IPatternArg *> PatternArgs;

/**
* Comparator for case-insensitive container keys.
*/
struct DE_PUBLIC InsensitiveLessThan
{
inline bool operator()(const String &a, const String &b) const
{
return a.compareWithoutCase(b) < 0;
}
};

public:
using SingleChar = char[2];
using size_type = dsize;
Expand Down

0 comments on commit e8d2de7

Please sign in to comment.