21 lines
10 KiB
JavaScript
21 lines
10 KiB
JavaScript
![]() |
/*
|
||
|
This file is part of Ext JS 3.4
|
||
|
|
||
|
Copyright (c) 2011-2013 Sencha Inc
|
||
|
|
||
|
Contact: http://www.sencha.com/contact
|
||
|
|
||
|
GNU General Public License Usage
|
||
|
This file may be used under the terms of the GNU General Public License version 3.0 as
|
||
|
published by the Free Software Foundation and appearing in the file LICENSE included in the
|
||
|
packaging of this file.
|
||
|
|
||
|
Please review the following information to ensure the GNU General Public License version 3.0
|
||
|
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
||
|
|
||
|
If you are unsure which license is appropriate for your use, please contact the sales department
|
||
|
at http://www.sencha.com/contact.
|
||
|
|
||
|
Build date: 2013-04-03 15:07:25
|
||
|
*/
|
||
|
Ext.data.JsonP.String({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/Ext-more.html#String' target='_blank'>Ext-more.js</a></div><div class='dependency'><a href='source/Ext.html#String' target='_blank'>Ext.js</a></div></pre><div class='doc-contents'><p>These functions are available as static methods on the JavaScript String object.</p>\n</div><div class='members'><div class='members-section'><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Instance Methods</h3><div id='method-toggle' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='String'>String</span><br/><a href='source/Ext-more.html#String-method-toggle' target='_blank' class='view-source'>view source</a></div><a href='#!/api/String-method-toggle' class='name expandable'>toggle</a>( <span class='pre'>value, other</span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>Utility function that allows you to easily switch a string between two alternating values. ...</div><div class='long'><p>Utility function that allows you to easily switch a string between two alternating values. The passed value\nis compared to the current string, and if they are equal, the other value that was passed in is returned. If\nthey are already different, the first value passed in is returned. Note that this method returns the new value\nbut does not change the current string.</p>\n\n<pre><code>// alternate sort directions\nsort = sort.toggle('ASC', 'DESC');\n\n// instead of conditional logic:\nsort = (sort == 'ASC' ? 'DESC' : 'ASC');\n</code></pre>\n\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>value</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The value to compare to the current string</p>\n</div></li><li><span class='pre'>other</span> : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a><div class='sub-desc'><p>The new value to use if the string already equals the first value passed in</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>The new value</p>\n</div></li></ul></div></div></div><div id='method-trim' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='String'>String</span><br/><a href='source/Ext-more.html#String-method-trim' target='_blank' class='view-source'>view source</a></div><a href='#!/api/String-method-trim' class='name expandable'>trim</a>( <span class='pre'></span> ) : <a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></div><div class='description'><div class='short'>Trims whitespace from either end of a string, leaving spaces within the string intact. ...</div><div class='long'><p>Trims whitespace from either end of a string, leaving spaces within the string intact. Example:</p>\n\n<pre><code>var s = ' foo bar ';\nalert('-' + s + '-'); //alerts \"- foo bar -\"\nalert('-' + s.trim() + '-'); //alerts \"-foo bar-\"\n</code></pre>\n\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/String\" rel=\"String\" class=\"docClass\">String</a></span><div class='sub-desc'><p>The trimmed string</p>\n</div></li></ul></div></div></div></div><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Static Methods</h3><div id='static-method-escape' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='String'>String</span><b
|