Change Archive::listMatchingMembers to match the pattern case-insensitively.

svn-id: r46046
This commit is contained in:
Johannes Schickel 2009-11-21 20:19:15 +00:00
parent aad8e8a2a2
commit e8c67bda4b

View File

@ -50,13 +50,11 @@ int Archive::listMatchingMembers(ArchiveMemberList &list, const String &pattern)
int matches = 0;
// need to match lowercase key
String lowercasePattern = pattern;
lowercasePattern.toLowercase();
ArchiveMemberList::iterator it = allNames.begin();
for ( ; it != allNames.end(); ++it) {
if ((*it)->getName().matchString(lowercasePattern, false, true)) {
// TODO: We match case-insenstivie for now, our API does not define whether that's ok or not though...
// For our use case case-insensitive is probably what we want to have though.
if ((*it)->getName().matchString(lowercasePattern, true, true)) {
list.push_back(*it);
matches++;
}