Upgrade to ExtJS 3.2.0 - Released 03/30/2010
[extjs.git] / docs / output / Ext.util.Format.html
index 3e1cf31..2b80147 100644 (file)
@@ -1,4 +1,4 @@
-<div xmlns:ext="http://www.extjs.com" class="body-wrap"><h1>Class <a href="source/Format.html#cls-Ext.util.Format">Ext.util.Format</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">Format.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Format.html#cls-Ext.util.Format">Format</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">Reusable data formatting functions<br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.util.Format-props"></a><h2>Public Properties</h2><div class="no-members">This class has no public properties.</div><a id="Ext.util.Format-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-capitalize"></a><b><a href="source/Format.html#method-Ext.util.Format-capitalize">capitalize</a></b>(&nbsp;<code>String&nbsp;value</code>&nbsp;)
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.util.Format-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>&#13;<a class="inner-link" href="#Ext.util.Format-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>&#13;<a class="inner-link" href="#Ext.util.Format-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>&#13;<a class="bookmark" href="../docs/?class=Ext.util.Format"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>&#13;</div><h1>Class <a href="source/Format.html#cls-Ext.util.Format">Ext.util.Format</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/Format.html#cls-Ext.util.Format">Format.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Format.html#cls-Ext.util.Format">Format</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">Reusable data formatting functions<br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.util.Format-props"></a><h2>Public Properties</h2><div class="no-members">This class has no public properties.</div><a id="Ext.util.Format-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-capitalize"></a><b><a href="source/Format.html#method-Ext.util.Format-capitalize">capitalize</a></b>(&nbsp;<code>String&nbsp;value</code>&nbsp;)
     :
                                         String<div class="mdesc"><div class="short">Converts the first character only of a string to upper case</div><div class="long">Converts the first character only of a string to upper case<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>value</code> : String<div class="sub-desc">The text to convert</div></li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc">The converted text</div></li></ul></div></div></div></td><td class="msource">Format</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-date"></a><b><a href="source/Format.html#method-Ext.util.Format-date">date</a></b>(&nbsp;<code>String/Date&nbsp;value</code>,&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;format</code>]</span>&nbsp;)
     :
     :
                                         String<div class="mdesc"><div class="short">Converts newline characters to the HTML tag &amp;lt;br/&gt;</div><div class="long">Converts newline characters to the HTML tag &lt;br/><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>The</code> : String<div class="sub-desc">string value to format.</div></li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc">The string with embedded &amp;lt;br/&gt; tags in place of newlines.</div></li></ul></div></div></div></td><td class="msource">Format</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-number"></a><b><a href="source/Format.html#method-Ext.util.Format-number">number</a></b>(&nbsp;<code>Number&nbsp;v</code>,&nbsp;<code>String&nbsp;format</code>&nbsp;)
     :
-                                        String<div class="mdesc"><div class="short">Formats the number according to the format string.&#13;
-&lt;div style="margin-left:40px"&gt;examples (123456.789):&#13;
-&lt;div style=...</div><div class="long">Formats the number according to the format string.\r
-<div style="margin-left:40px">examples (123456.789):\r
-<div style="margin-left:10px">\r
-0 - (123456) show only digits, no precision<br>\r
-0.00 - (123456.78) show only digits, 2 precision<br>\r
-0.0000 - (123456.7890) show only digits, 4 precision<br>\r
-0,000 - (123,456) show comma and digits, no precision<br>\r
-0,000.00 - (123,456.78) show comma and digits, 2 precision<br>\r
-0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision<br>\r
-To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end.\r
-For example: 0.000,00/i\r
+                                        String<div class="mdesc"><div class="short">Formats the number according to the format string.
+&lt;div style="margin-left:40px"&gt;examples (123456.789):
+&lt;div style="m...</div><div class="long">Formats the number according to the format string.
+<div style="margin-left:40px">examples (123456.789):
+<div style="margin-left:10px">
+0 - (123456) show only digits, no precision<br>
+0.00 - (123456.78) show only digits, 2 precision<br>
+0.0000 - (123456.7890) show only digits, 4 precision<br>
+0,000 - (123,456) show comma and digits, no precision<br>
+0,000.00 - (123,456.78) show comma and digits, 2 precision<br>
+0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision<br>
+To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end.
+For example: 0.000,00/i
 </div></div><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>v</code> : Number<div class="sub-desc">The number to format.</div></li><li><code>format</code> : String<div class="sub-desc">The way you would like to format this text.</div></li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc">The formatted number.</div></li></ul></div></div></div></td><td class="msource">Format</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-numberRenderer"></a><b><a href="source/Format.html#method-Ext.util.Format-numberRenderer">numberRenderer</a></b>(&nbsp;<code>String&nbsp;format</code>&nbsp;)
     :
                                         Function<div class="mdesc"><div class="short">Returns a number rendering function that can be reused to apply a number format multiple times efficiently</div><div class="long">Returns a number rendering function that can be reused to apply a number format multiple times efficiently<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>format</code> : String<div class="sub-desc">Any valid number format string for <a href="output/Ext.util.Format.html#Ext.util.Format-number" ext:member="number" ext:cls="Ext.util.Format">number</a></div></li></ul><strong>Returns:</strong><ul><li><code>Function</code><div class="sub-desc">The number formatting function</div></li></ul></div></div></div></td><td class="msource">Format</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-plural"></a><b><a href="source/Format.html#method-Ext.util.Format-plural">plural</a></b>(&nbsp;<code>Number&nbsp;value</code>,&nbsp;<code>String&nbsp;singular</code>,&nbsp;<span title="Optional" class="optional">[<code>String&nbsp;plural</code>]</span>&nbsp;)
     :
-                                        void<div class="mdesc"><div class="short">Selectively do a plural form of a word based on a numeric value. For example, in a template,&#13;
-{commentCount:plural("C...</div><div class="long">Selectively do a plural form of a word based on a numeric value. For example, in a template,\r
-{commentCount:plural("Comment")}  would result in "1 Comment" if commentCount was 1 or would be "x Comments"\r
+                                        void<div class="mdesc"><div class="short">Selectively do a plural form of a word based on a numeric value. For example, in a template,
+{commentCount:plural("Co...</div><div class="long">Selectively do a plural form of a word based on a numeric value. For example, in a template,
+{commentCount:plural("Comment")}  would result in "1 Comment" if commentCount was 1 or would be "x Comments"
 if the value is 0 or greater than 1.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>value</code> : Number<div class="sub-desc">The value to compare against</div></li><li><code>singular</code> : String<div class="sub-desc">The singular form of the word</div></li><li><code>plural</code> : String<div class="sub-desc">(optional) The plural form of the word (defaults to the singular with an "s")</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Format</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-round"></a><b><a href="source/Format.html#method-Ext.util.Format-round">round</a></b>(&nbsp;<code>Number/String&nbsp;value</code>,&nbsp;<code>Number&nbsp;precision</code>&nbsp;)
     :
                                         Number<div class="mdesc"><div class="short">Rounds the passed number to the required decimal precision.</div><div class="long">Rounds the passed number to the required decimal precision.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>value</code> : Number/String<div class="sub-desc">The numeric value to round.</div></li><li><code>precision</code> : Number<div class="sub-desc">The number of decimal places to which to round the first parameter's value.</div></li></ul><strong>Returns:</strong><ul><li><code>Number</code><div class="sub-desc">The rounded value.</div></li></ul></div></div></div></td><td class="msource">Format</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.util.Format-stripScripts"></a><b><a href="source/Format.html#method-Ext.util.Format-stripScripts">stripScripts</a></b>(&nbsp;<code>Mixed&nbsp;value</code>&nbsp;)