snipt

Ctrl+h for KB shortcuts
Notice: Snipt is moving away from free accounts on May 1st, 2014. Read more about the transition here.
#132125

Text only

Mobile App Development, iPhone Application Development Company AgileInfoways.com

1
2
3
4
5
Agile Infoways is a leading mobile app development company with over 600 apps built on iPhone, iPad and Android. Get free mobile app development quotes by http://www.agileinfoways.com/contact-us 

Our mobile application development services help businesses to mobilize their ... With a yearly rise in demand for Iphone apps, our developers and designers.

Find the feasible solutions for your business needs from a quality iPhone application development company who handle small to large projects.
https://snipt.net/embed/503bf95dc6b3e2d30771709de3c995e2/
https://snipt.net/raw/503bf95dc6b3e2d30771709de3c995e2/
503bf95dc6b3e2d30771709de3c995e2
text
Text only
5
2014-04-23T17:57:24
True
True
Apr 23, 2014 at 03:11 AM
/api/public/snipt/132125/
mobile-app-development-iphone-application-development-company-agileinfowayscom
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Agile Infoways is a leading mobile app development company with over 600 apps built on iPhone, iPad and Android. Get free mobile app development quotes by http://www.agileinfoways.com/contact-us </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>Our mobile application development services help businesses to mobilize their ... With a yearly rise in demand for Iphone apps, our developers and designers. </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Find the feasible solutions for your business needs from a quality iPhone application development company who handle small to large projects. </span></pre></div> </td></tr></table>
"hire wordpress", agileinfoways.com, as3, bash, c++, css, django, drupal, git, html, java, javascript, jquery, js, linux, mysql, php, python, ruby, sql, wordpress
#119788

Python

Ignore case in Python strings

1
2
3
4
5
6
I like the regular expression solution. Here's a function you can copy and paste into any function, thanks to python's block structure support.

def equals_ignore_case(str1, str2):
    import re
    return re.match(re.escape(str1) + r'\Z', str2, re.I) is not None
Since I used match instead of search, I didn't need to add a caret (^) to the regular expression.
https://snipt.net/embed/6139edcd57dfdd91eed0e8a2b6b1c755/
https://snipt.net/raw/6139edcd57dfdd91eed0e8a2b6b1c755/
6139edcd57dfdd91eed0e8a2b6b1c755
python
Python
6
2014-04-15T02:08:12
True
True
Mar 07, 2014 at 09:54 AM
/api/public/snipt/119788/
ignore-case-in-python-strings
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="n">I</span> <span class="n">like</span> <span class="n">the</span> <span class="n">regular</span> <span class="n">expression</span> <span class="n">solution</span><span class="o">.</span> <span class="n">Here</span><span class="s">&#39;s a function you can copy and paste into any function, thanks to python&#39;</span><span class="n">s</span> <span class="n">block</span> <span class="n">structure</span> <span class="n">support</span><span class="o">.</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">def</span> <span class="nf">equals_ignore_case</span><span class="p">(</span><span class="n">str1</span><span class="p">,</span> <span class="n">str2</span><span class="p">):</span> </span><span id="L-4"><a name="L-4"></a> <span class="kn">import</span> <span class="nn">re</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">return</span> <span class="n">re</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">re</span><span class="o">.</span><span class="n">escape</span><span class="p">(</span><span class="n">str1</span><span class="p">)</span> <span class="o">+</span> <span class="s">r&#39;\Z&#39;</span><span class="p">,</span> <span class="n">str2</span><span class="p">,</span> <span class="n">re</span><span class="o">.</span><span class="n">I</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span> </span><span id="L-6"><a name="L-6"></a><span class="n">Since</span> <span class="n">I</span> <span class="n">used</span> <span class="n">match</span> <span class="n">instead</span> <span class="n">of</span> <span class="n">search</span><span class="p">,</span> <span class="n">I</span> <span class="n">didn</span><span class="s">&#39;t need to add a caret (^) to the regular expression.</span> </span></pre></div> </td></tr></table>
"Ignore case", python