Change Archive::listMatchingMembers to match the pattern case-insensitively.
svn-id: r46046
This commit is contained in:
parent
aad8e8a2a2
commit
e8c67bda4b
1 changed files with 3 additions and 5 deletions
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue