Hi ,
How can I create a caseinsensitive qstringlist?
Qt Code:
sl<<"hello"; sl<<"Hello"; sl<<"HELLO";To copy to clipboard, switch view to plain text mode
So if I execute sl.remove("hello");
all items above will be removed from sl
Thanks
Hi ,
How can I create a caseinsensitive qstringlist?
Qt Code:
sl<<"hello"; sl<<"Hello"; sl<<"HELLO";To copy to clipboard, switch view to plain text mode
So if I execute sl.remove("hello");
all items above will be removed from sl
Thanks
QStringList itself doesn't do that, but you could use the filter() functions. They allow you to set case sensitivity. However, you would need to use a negative regexp: everything not matching "hello" should be returned. Of course you could also filter out everything that matches hello and then run through that list to remove it from the original list...
Unfortunately both options don't really give you a case insensitive list.
Horse sense is the thing that keeps horses from betting on people. --W.C. Fields
Ask Smart Questions
hashb (21st December 2010)
Bookmarks