<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Does a NSString contain a substring ?</title>
	<atom:link href="http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/feed/" rel="self" type="application/rss+xml" />
	<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/</link>
	<description>Coding under the Hammer</description>
	<lastBuildDate>Mon, 02 Apr 2012 21:02:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Una stringa contiene un&#8217;altra stringa? &#124; iOS Dev Blog</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-4928</link>
		<dc:creator>Una stringa contiene un&#8217;altra stringa? &#124; iOS Dev Blog</dc:creator>
		<pubDate>Sun, 25 Mar 2012 20:32:06 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-4928</guid>
		<description>[...] controllare se una data stringa ne contiene un&#8217;altra, è sufficiente usare il seguente snippet:   1 2 3 4 5 6 7 8 9 10 11 12 13 NSRange textRange; textRange =&#091;string [...]</description>
		<content:encoded><![CDATA[<p>[...] controllare se una data stringa ne contiene un&#8217;altra, è sufficiente usare il seguente snippet:   1 2 3 4 5 6 7 8 9 10 11 12 13 NSRange textRange; textRange =&#091;string [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ym</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-2184</link>
		<dc:creator>ym</dc:creator>
		<pubDate>Tue, 02 Aug 2011 16:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-2184</guid>
		<description>THANKS for your solution. It works like magic</description>
		<content:encoded><![CDATA[<p>THANKS for your solution. It works like magic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge Ramirez</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-841</link>
		<dc:creator>Jorge Ramirez</dc:creator>
		<pubDate>Sat, 12 Mar 2011 21:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-841</guid>
		<description>...solved... had something to do with compiler optimizations in release config mode, the function works great.</description>
		<content:encoded><![CDATA[<p>&#8230;solved&#8230; had something to do with compiler optimizations in release config mode, the function works great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge Ramirez</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-840</link>
		<dc:creator>Jorge Ramirez</dc:creator>
		<pubDate>Sat, 12 Mar 2011 21:09:21 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-840</guid>
		<description>I used your function and it worked great under Debug configuration, but once on Release Configuration, fails to read NSRange .. debug console ouputs:

Unable to access variable &quot;range&quot;

any Idea?</description>
		<content:encoded><![CDATA[<p>I used your function and it worked great under Debug configuration, but once on Release Configuration, fails to read NSRange .. debug console ouputs:</p>
<p>Unable to access variable &#8220;range&#8221;</p>
<p>any Idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spencer MacDonald</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-513</link>
		<dc:creator>Spencer MacDonald</dc:creator>
		<pubDate>Fri, 19 Feb 2010 19:51:46 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-513</guid>
		<description>Hi Susan

Something like the following (as a category on NSString):


- (BOOL)doesContainSubstring:(NSString *)substring{

	//If self or substring have 0 length they cannot match
	//This can have odd results with NSRange
	if([self length] == 0 &#124;&#124; [substring length] == 0)
		return NO;


	NSRange textRange;

	textRange = [[self lowercaseString] rangeOfString:[substring lowercaseString]];

	if(textRange.location != NSNotFound)
	{
		return YES;
	}else{
		return NO;
	}


}</description>
		<content:encoded><![CDATA[<p>Hi Susan</p>
<p>Something like the following (as a category on NSString):</p>
<p>- (BOOL)doesContainSubstring:(NSString *)substring{</p>
<p>	//If self or substring have 0 length they cannot match<br />
	//This can have odd results with NSRange<br />
	if([self length] == 0 || [substring length] == 0)<br />
		return NO;</p>
<p>	NSRange textRange;</p>
<p>	textRange = [[self lowercaseString] rangeOfString:[substring lowercaseString]];</p>
<p>	if(textRange.location != NSNotFound)<br />
	{<br />
		return YES;<br />
	}else{<br />
		return NO;<br />
	}</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Susan</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-512</link>
		<dc:creator>Susan</dc:creator>
		<pubDate>Fri, 19 Feb 2010 05:11:38 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-512</guid>
		<description>I&#039;ll use that code A LOT.
  
How would I make it into a Category and just make it a part of NSString everywhere?</description>
		<content:encoded><![CDATA[<p>I&#8217;ll use that code A LOT.</p>
<p>How would I make it into a Category and just make it a part of NSString everywhere?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-511</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Tue, 09 Feb 2010 14:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-511</guid>
		<description>You posted this 10 months ago and it&#039;s still helping people. Thanks for the information.</description>
		<content:encoded><![CDATA[<p>You posted this 10 months ago and it&#8217;s still helping people. Thanks for the information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jose</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-496</link>
		<dc:creator>jose</dc:creator>
		<pubDate>Sun, 20 Dec 2009 15:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-496</guid>
		<description>@frank, you need to chill dawg. just because you dont like (or know) something doesnt mean it sucks. different strokes for different folks.</description>
		<content:encoded><![CDATA[<p>@frank, you need to chill dawg. just because you dont like (or know) something doesnt mean it sucks. different strokes for different folks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Spencer MacDonald</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-484</link>
		<dc:creator>Spencer MacDonald</dc:creator>
		<pubDate>Wed, 16 Sep 2009 18:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-484</guid>
		<description>To say it is a bit messed up is a bit extreme :)

Its different, and I expect a lot of people prefer it to C/C++, myself included.</description>
		<content:encoded><![CDATA[<p>To say it is a bit messed up is a bit extreme <img src='http://objcolumnist.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Its different, and I expect a lot of people prefer it to C/C++, myself included.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: frankSinatra</title>
		<link>http://objcolumnist.com/2009/04/12/does-a-nsstring-contain-a-substring/comment-page-1/#comment-483</link>
		<dc:creator>frankSinatra</dc:creator>
		<pubDate>Wed, 16 Sep 2009 18:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://objcolumnist.com/?p=36#comment-483</guid>
		<description>crisbetewsky, pity!what pity! probably because Obj-C sucks big time. People in Apple are so stupid not to use just C/C++ instead of this messed up language obj-C. (-) (+) before function call waiting for some typos and headaches.</description>
		<content:encoded><![CDATA[<p>crisbetewsky, pity!what pity! probably because Obj-C sucks big time. People in Apple are so stupid not to use just C/C++ instead of this messed up language obj-C. (-) (+) before function call waiting for some typos and headaches.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

