<p dir="ltr">I'm not sure but it seems like you could use operator.__contains__ . it might be faster.</p>
<div class="gmail_quote">On 28 Jul 2013 20:18, "Peter Otten" <__<a href="mailto:peter__@web.de">peter__@web.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Joseph L. Casale wrote:<br>
<br>
>> Has anyone encountered this and utilized other existing functions<br>
>> within the shipped 3.6.21 sqlite version to accomplish this?<br>
><br>
> Sorry guys, forgot about create_function...<br>
<br>
Too late, I already did the demo ;)<br>
<br>
>>> import sqlite3<br>
>>> db = sqlite3.connect(":memory:")<br>
>>> cs = db.cursor()<br>
>>> cs.execute('select instr("the quick brown fox", "brown")').fetchone()[0]<br>
Traceback (most recent call last):<br>
  File "<stdin>", line 1, in <module><br>
sqlite3.OperationalError: no such function: instr<br>
>>> def instr(a, b):<br>
...     return a.find(b) + 1 # add NULL-handling etc.<br>
...<br>
>>> db.create_function("instr", 2, instr)<br>
>>> cs.execute('select instr("the quick brown fox", "brown")').fetchone()[0]<br>
11<br>
>>> cs.execute('select instr("the quick brown fox", "red")').fetchone()[0]<br>
0<br>
<br>
<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</blockquote></div>