<?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: Substituting values in strings using the Flex StringUtil class&#8217;s substitute() method</title>
	<atom:link href="http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Reny Mohan</title>
		<link>http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/comment-page-1/#comment-6804</link>
		<dc:creator>Reny Mohan</dc:creator>
		<pubDate>Wed, 20 Jan 2010 13:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/#comment-6804</guid>
		<description>Hi peter,
   i&#039;m struggling with flex printing. i searched a lot in the net ..i want to print a part of the display screen.pls help me..
thanks in advance
Reny</description>
		<content:encoded><![CDATA[<p>Hi peter,<br />
   i&#8217;m struggling with flex printing. i searched a lot in the net ..i want to print a part of the display screen.pls help me..<br />
thanks in advance<br />
Reny</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Santosh Kulkarni</title>
		<link>http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/comment-page-1/#comment-974</link>
		<dc:creator>Santosh Kulkarni</dc:creator>
		<pubDate>Tue, 06 Jan 2009 12:40:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/#comment-974</guid>
		<description>The work around for the above problem would be having custom Implementaion of

stringUtil.substitute (str:String, ... rest):String {} as below. By just avoding using regExp. Because in RegExp &quot;$&quot; is used as the metacharcter so it has got Special meaning.

&lt;pre class=&quot;code&quot;&gt;
public static function substitute1(str:String, ... rest):String
    {
        if (str == null) return &#039;&#039;;

        // Replace all of the parameters in the msg string.
        var len:uint = rest.length;
        var args:Array;
        if (len == 1 &amp;&amp; rest[0] is Array)
        {
            args = rest[0] as Array;
            len = args.length;
        }
        else
        {
            args = rest;
        }

        for (var i:int = 0; i &lt; len; i++)
        {
            str = str.replace(&quot;{&quot;+i+&quot;}&quot;, args[i]);
        }

        return str;
    }
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>The work around for the above problem would be having custom Implementaion of</p>
<p>stringUtil.substitute (str:String, &#8230; rest):String {} as below. By just avoding using regExp. Because in RegExp &#8220;$&#8221; is used as the metacharcter so it has got Special meaning.</p>
<pre class="code">
public static function substitute1(str:String, ... rest):String
    {
        if (str == null) return '';

        // Replace all of the parameters in the msg string.
        var len:uint = rest.length;
        var args:Array;
        if (len == 1 &amp;&amp; rest[0] is Array)
        {
            args = rest[0] as Array;
            len = args.length;
        }
        else
        {
            args = rest;
        }

        for (var i:int = 0; i &lt; len; i++)
        {
            str = str.replace("{"+i+"}", args[i]);
        }

        return str;
    }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/comment-page-1/#comment-975</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 26 Dec 2008 21:49:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/#comment-975</guid>
		<description>Santosh Kulkarni,

Can you please file a bug at http://bugs.adobe.com/flex/ and include a simple test case, if possible.

Peter</description>
		<content:encoded><![CDATA[<p>Santosh Kulkarni,</p>
<p>Can you please file a bug at <a href="http://bugs.adobe.com/flex/" rel="nofollow">http://bugs.adobe.com/flex/</a> and include a simple test case, if possible.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Santosh Kulkarni</title>
		<link>http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/comment-page-1/#comment-973</link>
		<dc:creator>Santosh Kulkarni</dc:creator>
		<pubDate>Wed, 24 Dec 2008 10:19:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/#comment-973</guid>
		<description>StringUtil.substitute It seems that it will not work with Special charchacters like $ specially with $$ it will omit one $.</description>
		<content:encoded><![CDATA[<p>StringUtil.substitute It seems that it will not work with Special charchacters like $ specially with $$ it will omit one $.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: whataslacker</title>
		<link>http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/comment-page-1/#comment-972</link>
		<dc:creator>whataslacker</dc:creator>
		<pubDate>Sun, 01 Jun 2008 05:18:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/#comment-972</guid>
		<description>this would make for a great &#039;mad libs&#039; program</description>
		<content:encoded><![CDATA[<p>this would make for a great &#8216;mad libs&#8217; program</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FlexLover</title>
		<link>http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/comment-page-1/#comment-971</link>
		<dc:creator>FlexLover</dc:creator>
		<pubDate>Sat, 08 Sep 2007 17:40:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/08/substituting-values-in-strings-using-the-flex-stringutil-classs-substitute-method/#comment-971</guid>
		<description>Tank&#039;you an other one very useful example!</description>
		<content:encoded><![CDATA[<p>Tank&#8217;you an other one very useful example!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

