<?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: Find and Replace</title>
	<atom:link href="http://blog.tomorrowevening.com/fla/find-and-replace/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tomorrowevening.com/fla/find-and-replace/</link>
	<description>Digitally Driven</description>
	<lastBuildDate>Fri, 19 Mar 2010 15:42:54 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Colin</title>
		<link>http://blog.tomorrowevening.com/fla/find-and-replace/comment-page-1/#comment-21</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Fri, 19 Mar 2010 03:28:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=165#comment-21</guid>
		<description>Ha! How right you are. It&#039;s funny how knowing the basics can make life so much easier. I&#039;m definitely swapping out my method with that haha.</description>
		<content:encoded><![CDATA[<p>Ha! How right you are. It&#8217;s funny how knowing the basics can make life so much easier. I&#8217;m definitely swapping out my method with that haha.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens</title>
		<link>http://blog.tomorrowevening.com/fla/find-and-replace/comment-page-1/#comment-18</link>
		<dc:creator>Jens</dc:creator>
		<pubDate>Thu, 18 Mar 2010 01:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=165#comment-18</guid>
		<description>I love those kind of utility functions that make your life easier... I use a different method in my StringUtils class to achieve the find and replace functionality. Basically does the same thing, just with less lines of code :P

public static function replace(searchString:String, find:String, replace:String):String {
  return searchString.split(find).join(replace);
}

It uses the split() method of String classes, that turns the original string into an array with the search string being the delimiter, thus removing it. Then you join the array back together with the new string as seperator (which inserts it). Should the searchterm not exist, then the array will only have 1 node, so nothing will have to be joined and the old string gets returned... Same result, different method... I love to see how everyone approaches those problems differently. By comparing the methods you can learn so much...

Just found (and bookmarked) your blog btw since you linked it on Kontain... I always have big plans for mine but never find the time to really get it going...</description>
		<content:encoded><![CDATA[<p>I love those kind of utility functions that make your life easier&#8230; I use a different method in my StringUtils class to achieve the find and replace functionality. Basically does the same thing, just with less lines of code :P</p>
<p>public static function replace(searchString:String, find:String, replace:String):String {<br />
  return searchString.split(find).join(replace);<br />
}</p>
<p>It uses the split() method of String classes, that turns the original string into an array with the search string being the delimiter, thus removing it. Then you join the array back together with the new string as seperator (which inserts it). Should the searchterm not exist, then the array will only have 1 node, so nothing will have to be joined and the old string gets returned&#8230; Same result, different method&#8230; I love to see how everyone approaches those problems differently. By comparing the methods you can learn so much&#8230;</p>
<p>Just found (and bookmarked) your blog btw since you linked it on Kontain&#8230; I always have big plans for mine but never find the time to really get it going&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
