<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Find an occurrence in a QList]]></title><description><![CDATA[<p dir="auto">Hello,<br />
im looking to find a way of an occurance of a string inside a QList&lt;Qstring&gt;.<br />
this is what i did:</p>
<p dir="auto">i declare a string str1<br />
i have a QList of strings List1 where i stock some QStrings that i receive.<br />
and i use the the methode contains as  i do here: list1.contains(str1)<br />
but i dont know if i it returns true for  the exact match or just a substring .</p>
<p dir="auto">thank you.</p>
]]></description><link>https://forum.qt.io/topic/76753/find-an-occurrence-in-a-qlist</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 09:27:46 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/76753.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Mar 2017 16:39:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Find an occurrence in a QList on Wed, 01 Mar 2017 17:08:05 GMT]]></title><description><![CDATA[<p dir="auto">QList.contains() should only return true for case sensitive exact matches.</p>
<pre><code>QString strInstance = QString("Quick Test");

listOStrings.append(strInstance);

listOStrings.contains("Quick") // Returns False
listOStrings.contains("quick test") // Returns False
listOStrings.contains("Quick Test") // Returns True
listOStrings.contains(strInstance) // Returns True
</code></pre>
<p dir="auto">Hope this helps.</p>
]]></description><link>https://forum.qt.io/post/379197</link><guid isPermaLink="true">https://forum.qt.io/post/379197</guid><dc:creator><![CDATA[tom8oe]]></dc:creator><pubDate>Wed, 01 Mar 2017 17:08:05 GMT</pubDate></item></channel></rss>