From kde-commits Wed Jan 28 08:21:40 2004 From: Simon Hausmann Date: Wed, 28 Jan 2004 08:21:40 +0000 To: kde-commits Subject: Re: kdegames/atlantik Message-Id: <200401280921.40911.hausmann () kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=107527824722948 On Wednesday 28 January 2004 09:02, Rob Kaper wrote: > On Wed, Jan 28, 2004 at 01:00:53AM +0100, Andy Goossens wrote: > > > QString::find is faster than ::contains > > > > > > - if (text.contains("rolls")) > > > + if ( text.find( QRegExp("rolls") ) != -1 ) > > > > Even with a useless QRegExp? > > It's the "default" method for QString::find, the others are overloaded and > provided for convenience only, so I assume ::find will at some point have > to use a QRegExp for its mojo anyway. For QString it doesn't use QRegExp internally but two different algorithms (depending on size) , supposedly faster. Simon