PDA

View Full Version : QString looking method "find"



Skowroniasty
14th November 2009, 17:20
Hi,

I want search all index of substrings on my core string, but I don't see any method for search substring, for exemple:
string core= "abcaaannhhdd"
string key ="an"
int index = core.find(key)

How I can do it with QString ?


currently Im thinking about use QString::mid , but split string and compare with "key" ... for many large strings is not optimal. Is this only way ?

wysota
14th November 2009, 18:00
QString::indexOf()