<?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: Removing Spaces from a String in ActionScript 3</title>
	<atom:link href="http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/</link>
	<description>Web Development with WordPress and Thesis</description>
	<lastBuildDate>Wed, 11 Aug 2010 11:49:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: judian81</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-699</link>
		<dc:creator>judian81</dc:creator>
		<pubDate>Sat, 10 Jul 2010 23:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-699</guid>
		<description>hello

i use this code to handle spaces. to it will not remove all spaces.
but remove double, front and back spaces.
i use this for a shell so commands wil always work in cases there is somehow a space to many.

		function remove_double_space(par_String:String):String { 
			var sReturn:String=&quot;&quot;; 
			var sTrue:Boolean=false;
			for (var i=0; i&lt;par_String.length; i++) { 
				if (par_String.charAt(i)!=&quot; &quot;) { 
					sReturn = sReturn+par_String.charAt(i); 
					sTrue=false;
				} else if (sTrue==false) {
					sReturn = sReturn+&quot; &quot;; 
					sTrue=true;
				} 
			} 
			return LTrim(RTrim(sReturn)); 
		}
		function LTrim(s:String):String { 
			var i=0;
			while ((i0) &amp;&amp; (s.substr(i,1)==&#039; &#039;)) i--; 
			return (s.substr(0,i+1)); 
		} 

great post.

have fun programming</description>
		<content:encoded><![CDATA[<p>hello</p>
<p>i use this code to handle spaces. to it will not remove all spaces.<br />
but remove double, front and back spaces.<br />
i use this for a shell so commands wil always work in cases there is somehow a space to many.</p>
<p>		function remove_double_space(par_String:String):String {<br />
			var sReturn:String=&#8221;";<br />
			var sTrue:Boolean=false;<br />
			for (var i=0; i&lt;par_String.length; i++) {<br />
				if (par_String.charAt(i)!=&quot; &quot;) {<br />
					sReturn = sReturn+par_String.charAt(i);<br />
					sTrue=false;<br />
				} else if (sTrue==false) {<br />
					sReturn = sReturn+&quot; &quot;;<br />
					sTrue=true;<br />
				}<br />
			}<br />
			return LTrim(RTrim(sReturn));<br />
		}<br />
		function LTrim(s:String):String {<br />
			var i=0;<br />
			while ((i0) &amp;&amp; (s.substr(i,1)==&#8217; &#8216;)) i&#8211;;<br />
			return (s.substr(0,i+1));<br />
		} </p>
<p>great post.</p>
<p>have fun programming</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davet</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-614</link>
		<dc:creator>davet</dc:creator>
		<pubDate>Fri, 26 Mar 2010 10:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-614</guid>
		<description>Hi

I don&#039;t know if someone else has mentioned this but you can use stuff like:

var inString:String = &quot;  this has whitespace&quot;;
var inString2:String = &quot;this has no whitespace&quot;;

var a:Array = inString.split(/^\s+/);
var b:Array = inString2.split(/^\s+/);

Any leading whitespace is removed , you can use different flags to adapt to your needs
Nice post though

All the best</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>I don&#8217;t know if someone else has mentioned this but you can use stuff like:</p>
<p>var inString:String = &#8221;  this has whitespace&#8221;;<br />
var inString2:String = &#8220;this has no whitespace&#8221;;</p>
<p>var a:Array = inString.split(/^\s+/);<br />
var b:Array = inString2.split(/^\s+/);</p>
<p>Any leading whitespace is removed , you can use different flags to adapt to your needs<br />
Nice post though</p>
<p>All the best</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dca</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-508</link>
		<dc:creator>dca</dc:creator>
		<pubDate>Tue, 19 Jan 2010 20:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-508</guid>
		<description>Thank you so much for the tutorial!!! It worked flawlessly! I modified it so that it removed extra vertical spaces in an external text document.</description>
		<content:encoded><![CDATA[<p>Thank you so much for the tutorial!!! It worked flawlessly! I modified it so that it removed extra vertical spaces in an external text document.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-491</link>
		<dc:creator>Dustin</dc:creator>
		<pubDate>Wed, 09 Dec 2009 22:23:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-491</guid>
		<description>Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbj</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-413</link>
		<dc:creator>dbj</dc:creator>
		<pubDate>Sat, 31 Oct 2009 09:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-413</guid>
		<description>I defy any C# &quot;afficionado&quot; to show me parallel to this, in her favourite language ;o)

  if (&quot;function&quot; !== typeof &quot;&quot;.minus)
        String.prototype.minus = function( what_ ) {
            ///
            /// &quot;ABCBDBEB&quot;.minus(&quot;B&quot;), returns : &quot;ACDE&quot;
            /// Argument is optional, by default it is one space char
            /// myText.minus(), returns myText without spaces
            /// argument can be an regular expression
            /// reg.exp. given does not require &#039;g&#039; or &#039;m&#039; modifier
            /// if argument is not found in the original, the original is returned
            ///
            return (this.split(what_ &#124;&#124; &quot; &quot; )).join( &quot;&quot; ) ;
        }

--DBJ</description>
		<content:encoded><![CDATA[<p>I defy any C# &#8220;afficionado&#8221; to show me parallel to this, in her favourite language ;o)</p>
<p>  if (&#8220;function&#8221; !== typeof &#8220;&#8221;.minus)<br />
        String.prototype.minus = function( what_ ) {<br />
            ///<br />
            /// &#8220;ABCBDBEB&#8221;.minus(&#8220;B&#8221;), returns : &#8220;ACDE&#8221;<br />
            /// Argument is optional, by default it is one space char<br />
            /// myText.minus(), returns myText without spaces<br />
            /// argument can be an regular expression<br />
            /// reg.exp. given does not require &#8216;g&#8217; or &#8216;m&#8217; modifier<br />
            /// if argument is not found in the original, the original is returned<br />
            ///<br />
            return (this.split(what_ || &#8221; &#8221; )).join( &#8220;&#8221; ) ;<br />
        }</p>
<p>&#8211;DBJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dbj</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-412</link>
		<dc:creator>dbj</dc:creator>
		<pubDate>Sat, 31 Oct 2009 02:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-412</guid>
		<description>function strip(original, of_what )
{
 return (original.split( of_what &#124;&#124; &quot; &quot;)).join(&quot;&quot;);
}

Probably a bit more useful ... 
Also the second, optional, argument can be either string or an regular expression ...

--DBJ</description>
		<content:encoded><![CDATA[<p>function strip(original, of_what )<br />
{<br />
 return (original.split( of_what || &#8221; &#8220;)).join(&#8220;&#8221;);<br />
}</p>
<p>Probably a bit more useful &#8230;<br />
Also the second, optional, argument can be either string or an regular expression &#8230;</p>
<p>&#8211;DBJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: O L</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-311</link>
		<dc:creator>O L</dc:creator>
		<pubDate>Thu, 17 Sep 2009 14:49:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-311</guid>
		<description>Much simpler:
myString.replace(/\s+/g, &#039;&#039;));</description>
		<content:encoded><![CDATA[<p>Much simpler:<br />
myString.replace(/\s+/g, &#8221;));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Womack</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-178</link>
		<dc:creator>James Womack</dc:creator>
		<pubDate>Wed, 22 Jul 2009 22:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-178</guid>
		<description>I modified this to convert spaces to URL-encoded spaces (%20). Thanks for the help!</description>
		<content:encoded><![CDATA[<p>I modified this to convert spaces to URL-encoded spaces (%20). Thanks for the help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-168</link>
		<dc:creator>Ian</dc:creator>
		<pubDate>Wed, 15 Jul 2009 02:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-168</guid>
		<description>Very useful. Thank you very much!</description>
		<content:encoded><![CDATA[<p>Very useful. Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Lindvall</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/comment-page-1/#comment-131</link>
		<dc:creator>Michael Lindvall</dc:creator>
		<pubDate>Thu, 21 May 2009 20:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167#comment-131</guid>
		<description>Thanks.  This worked like a charm.</description>
		<content:encoded><![CDATA[<p>Thanks.  This worked like a charm.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
