<?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"
	>
<channel>
	<title>Comments on: JavaScript trim() function</title>
	<atom:link href="http://artlung.com/blog/2006/04/21/javascript-trim-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/</link>
	<description>Blogging sporadically since February 2001.</description>
	<pubDate>Thu, 24 Jul 2008 10:40:55 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Joe Crawford</title>
		<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-32011</link>
		<dc:creator>Joe Crawford</dc:creator>
		<pubDate>Thu, 03 Aug 2006 03:51:31 +0000</pubDate>
		<guid isPermaLink="false">http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-32011</guid>
		<description>I couldn't agree more KKL.

Take care and happy programming!</description>
		<content:encoded><![CDATA[<p>I couldn&#8217;t agree more <span class="caps">KKL</span>.</p>
<p>Take care and happy programming!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kok Koon Leong</title>
		<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-32010</link>
		<dc:creator>Kok Koon Leong</dc:creator>
		<pubDate>Thu, 03 Aug 2006 03:14:19 +0000</pubDate>
		<guid isPermaLink="false">http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-32010</guid>
		<description>I like your javascript trim function. I have seen a number of similar code using regular expressions and tried some of them. They all work but yours is another refreshing take on 'trim'.
That's the beauty of programming - so many ways to solve one problem.</description>
		<content:encoded><![CDATA[<p>I like your javascript trim function. I have seen a number of similar code using regular expressions and tried some of them. They all work but yours is another refreshing take on &#8216;trim&#8217;.<br />
That&#8217;s the beauty of programming &#8211; so many ways to solve one problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thogek</title>
		<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-11518</link>
		<dc:creator>Thogek</dc:creator>
		<pubDate>Wed, 26 Apr 2006 02:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-11518</guid>
		<description>Depending on your version of JavaScript (i.e., regular expression support), you may also be able to do:

function TrimString(str) {
	str = str.replace(/^[ ]+(.*)$/, '$1');  // Trims leading spaces
	str = str.replace(/^(.*)[ ]+$/, '$1');  // Trims trailing spaces
	return str;
}</description>
		<content:encoded><![CDATA[<p>Depending on your version of JavaScript (i.e., regular expression support), you may also be able to do:</p>
<p>function TrimString(str) {<br />
str = str.replace(/^[ ]+(.*)$/, &#8216;$1&#8217;);  // Trims leading spaces<br />
str = str.replace(/^(.*)[ ]+$/, &#8216;$1&#8217;);  // Trims trailing spaces<br />
return str;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Crawford</title>
		<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10745</link>
		<dc:creator>Joe Crawford</dc:creator>
		<pubDate>Sat, 22 Apr 2006 20:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10745</guid>
		<description>What I was thinking of I had read &lt;a href="http://www.backupbrain.com/2005_07_10_archive.html#a004630" rel="nofollow"&gt;here&lt;/a&gt;, it's &lt;a href="http://www.openjsan.org/" rel="nofollow"&gt;openjsan.org&lt;/a&gt;. Though it might suck.</description>
		<content:encoded><![CDATA[<p>What I was thinking of I had read <a href="http://www.backupbrain.com/2005_07_10_archive.html#a004630" rel="nofollow">here</a>, it&#8217;s <a href="http://www.openjsan.org/" rel="nofollow">openjsan.org</a>. Though it might suck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Crawford</title>
		<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10725</link>
		<dc:creator>Joe Crawford</dc:creator>
		<pubDate>Sat, 22 Apr 2006 16:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10725</guid>
		<description>Nate, the code strips space characters from the beginning then the end of a string, then returns the result.

Sassy, I swear I was just reading about an effort to build something like PEAR or CPAN but for JavaScript. Somehow though, in my bleary eyed morning state, I can't think of either a url or a way to search for it that works.

Not enough caffiene, perhaps!</description>
		<content:encoded><![CDATA[<p>Nate, the code strips space characters from the beginning then the end of a string, then returns the result.</p>
<p>Sassy, I swear I was just reading about an effort to build something like <span class="caps">PEAR</span> or <span class="caps">CPAN</span> but for JavaScript. Somehow though, in my bleary eyed morning state, I can&#8217;t think of either a url or a way to search for it that works.</p>
<p>Not enough caffiene, perhaps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sassy</title>
		<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10724</link>
		<dc:creator>Sassy</dc:creator>
		<pubDate>Sat, 22 Apr 2006 15:30:26 +0000</pubDate>
		<guid isPermaLink="false">http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10724</guid>
		<description>I am starting a pretty big AJAX project, and we are trying to decide to use a 'framework' vs straight Javascript.  I am pushing for straight JS but the team is leaning towards the frameworks, which are admittedly easier to use. The problem I am running into is the lack of libraries in JS.  You miss the little things like string.trim() and string.format().  Next week I am going to look into some various utility and string libs, if I find anything decent I'll shoot you a link.</description>
		<content:encoded><![CDATA[<p>I am starting a pretty big <span class="caps">AJAX</span> project, and we are trying to decide to use a &#8216;framework&#8217; vs straight Javascript.  I am pushing for straight JS but the team is leaning towards the frameworks, which are admittedly easier to use. The problem I am running into is the lack of libraries in JS.  You miss the little things like string.trim() and string.format().  Next week I am going to look into some various utility and string libs, if I find anything decent I&#8217;ll shoot you a link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: natedavidr</title>
		<link>http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10618</link>
		<dc:creator>natedavidr</dc:creator>
		<pubDate>Sat, 22 Apr 2006 03:10:55 +0000</pubDate>
		<guid isPermaLink="false">http://artlung.com/blog/2006/04/21/javascript-trim-function/#comment-10618</guid>
		<description>if i'm not mistaken, that's for trimming preceding spaces, right?  darn the spaces!  darn em!</description>
		<content:encoded><![CDATA[<p>if i&#8217;m not mistaken, that&#8217;s for trimming preceding spaces, right?  darn the spaces!  darn em!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
