+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
- <head>
- <meta http-equiv="content-type" content="text/html; charset=undefined" />
- <meta name="generator" content="JsDoc Toolkit" />
-
-
- <title>JsDoc Reference - String</title>
-
-
- <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
- <link rel="stylesheet" type="text/css" href="../default.css" />
-
-
- <script type="text/javascript" src="../page.js">
-
- </script>
-
-
- </head>
-
- <body onload="RooDocsPage.onload();">
-
-
-<div class="body-wrap">
-
- <!-- ============================== links to methods. ================================= -->
-
- <div class="top-tools">
- <!--
- <a class="inner-link" href="#String-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
- <a class="inner-link" href="#String-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
- <a class="inner-link" href="#String-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
- <a class="inner-link" href="#String-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
- <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
- -->
- </div>
-
-
-<!-- ============================== inheritance Block. ================================= -->
-
-<!-- ============================== class title / details ============================ -->
-
-
- <h1 class="classTitle">
-
- Built-In Class String
- </h1>
-
- <table cellspacing="0" class="class-summary-table">
-
- <tr><td class="label">Defined In:</td><td class="hd-info">
-
- </td></tr>
- <tr><td class="label">Class:</td><td class="hd-info">String</td></tr>
-
-
-
-
- </table>
-
-
-<!-- ============================== class summary ========================== -->
- <div class="description">
-
- </div>
-
-
-<!-- ============================== Class comment block... ========================== -->
-
-<div class="comments">
- <b>Class Comments / Notes</B> =>
- <u onclick="parent.CommentDialog.showCommentId = 'String';">[Add Your comment/notes about this class]</u>
- <br/>
- <iframe frameborder="0" id="comments-" style="border: none;width:100%;"
- src="/blog.php/GtkDjsComments/String.html"></iframe>
-</div>
-
-
-
-<!-- ============================== config options ========================== -->
-
-
-
-
- <div class="hr"></div>
- <a id="String-configs"></a>
-
-
-
- <table cellspacing="0" class="member-table">
- <caption class="Empty">Config Options - Has None</caption>
- </table>
-
-
-
-
-
-
-
-
-
-
-
-
- <!-- ============================== public properties ==================== -->
-
-
-
- <a id="String-props"></a>
-
-
-
-
-
- <table cellspacing="0" class="member-table">
- <caption class="Empty">Public Properties - Has None</caption>
- </table>
-
-
-
-
- <!-- ============================== methods summary / details ======================== -->
-
-
- <a id="String-methods"></a>
- <!-- constructor?? -->
-
- <!-- static's first
-
-
- -->
-
- <!-- then dynamics first -->
-
-
-
-
-
-
- <table cellspacing="0" class="member-table">
- <caption>Public Methods</caption>
- <tr>
- <th class="sig-header" colspan="2">Method</th>
- <th class="msource-header">Defined By</th>
-
- </tr>
-
-
-
-
-
-
-
- <tr class="method-row config-row-alt0 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="String-method-escape" name=".escape"></a>
- <div class="fixedFont">
- <span class="attributes">String.</span><b class="itemname">escape</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>string</i></B>)
-
-
- :
-
-
- <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Escapes the passed string for ' and \</div>
-
-
-
- <div class="long">
-
- Escapes the passed string for ' and \
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>string</b>
-
- </dt>
- <dd>The string to escape</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The escaped string</dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- String
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt1 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="String-method-format" name=".format"></a>
- <div class="fixedFont">
- <span class="attributes">String.</span><b class="itemname">format</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>string</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>value1</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>value2</i></B>)
-
-
- :
-
-
- <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.</div>
-
-
-
- <div class="long">
-
- Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens. Each<br/>token must be unique, and must increment in the format {0}, {1}, etc. Example usage:<br/><pre><code><br/>var cls = 'my-class', text = 'Some text';<br/>var s = String.format('<div class="{0}">{1}</div>', cls, text);<br/>// s now contains the string: '<div class="my-class">Some text</div>'<br/></code></pre>
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>string</b>
-
- </dt>
- <dd>The tokenized string to be formatted</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>value1</b>
-
- </dt>
- <dd>The value to replace token {0}</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>value2</b>
-
- </dt>
- <dd>Etc...</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The formatted string</dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- String
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt0 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="String-method-leftPad" name=".leftPad"></a>
- <div class="fixedFont">
- <span class="attributes">String.</span><b class="itemname">leftPad</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>string</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>size</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>char</i></B>)
-
-
- :
-
-
- <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Pads the left side of a string with a specified character.</div>
-
-
-
- <div class="long">
-
- Pads the left side of a string with a specified character. This is especially useful<br/>for normalizing number and date strings. Example usage:<br/><pre><code><br/>var s = String.leftPad('123', 5, '0');<br/>// s now contains the string: '00123'<br/></code></pre>
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>string</b>
-
- </dt>
- <dd>The original string</dd>
-
- <dt>
- <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>size</b>
-
- </dt>
- <dd>The total length of the output string</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>char</b>
-
- </dt>
- <dd>(optional) The character with which to pad the original string (defaults to empty string " ")</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The padded string</dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- String
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt1 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="String-method-toggle" name=".toggle"></a>
- <div class="fixedFont">
- <span class="attributes"></span><b class="itemname">toggle</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>value</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>other</i></B>)
-
-
- :
-
-
- <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Utility function that allows you to easily switch a string between two alternating values.</div>
-
-
-
- <div class="long">
-
- Utility function that allows you to easily switch a string between two alternating values. The passed value<br/>is compared to the current string, and if they are equal, the other value that was passed in is returned. If<br/>they are already different, the first value passed in is returned. Note that this method returns the new value<br/>but does not change the current string.<br/><pre><code><br/>// alternate sort directions<br/>sort = sort.toggle('ASC', 'DESC');<br/><br/>// instead of conditional logic:<br/>sort = (sort == 'ASC' ? 'DESC' : 'ASC');<br/></code></pre>
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>value</b>
-
- </dt>
- <dd>The value to compare to the current string</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>other</b>
-
- </dt>
- <dd>The new value to use if the string already equals the first value passed in</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The new value</dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- String
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt0 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="String-method-unicodeClean" name=".unicodeClean"></a>
- <div class="fixedFont">
- <span class="attributes"></span><b class="itemname">unicodeClean</b>
-
- ()
-
-
- :
-
-
- <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Remove invalid unicode characters from a string</div>
-
-
-
- <div class="long">
-
- Remove invalid unicode characters from a string
-
-
-
-
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> The clean string</dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- String
-
- </td>
- </tr>
-
-
- </table>
-
-
- <!-- ============================== events summary / details ======================== -->
-
-
- <a id="String-events"></a>
-
-
-
-
-
- <table cellspacing="0" class="member-table">
- <caption class="Empty">Events - Has None</caption>
- </table>
-
-
-
-
-
-
-
-
-
-<!-- ============================== footer ================================= -->
- <div class="fineprint" style="clear:both">
-
- Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:55 GMT+0800 (HKT)
- Based on
- <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>
- </div>
- </body>
-</html>