Any methods for string token on QString?

Stephan Hermann sh at sourcecode.de
Sun Sep 23 19:30:14 BST 2001


Am Sonntag, 23. September 2001 16:11 schrieben Sie:
: Hi,
:
: I can split up a string (in C) with strtok. But how to
: split up a string for a QString?

I found this example on the webpage of trolltech....
it works for me very good.


QString temp2;
QStringList list2;

temp2="test1,test2,test3,test4";

list2=QStringList::split(",",temp2);
for (QStringList::Iterator it4=list2.begin();it4 !=list2.end();++it4) {
	// Do something with the tokens in list2.
}

regards,
\sh

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list