[Swift-commit] r8427 - www/Swift-T

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Mon Apr 6 10:43:39 CDT 2015


Author: wozniak
Date: 2015-04-06 10:43:39 -0500 (Mon, 06 Apr 2015)
New Revision: 8427

Modified:
   www/Swift-T/guide.html
Log:
Doc improvements


Modified: www/Swift-T/guide.html
===================================================================
--- www/Swift-T/guide.html	2015-04-06 15:32:12 UTC (rev 8426)
+++ www/Swift-T/guide.html	2015-04-06 15:43:39 UTC (rev 8427)
@@ -2013,22 +2013,52 @@
 <div class="sect1">
 <h2 id="_operators">12. Operators</h2>
 <div class="sectionbody">
-<div class="paragraph"><p>The following binary arithmetic operators on numbers are defined:</p></div>
+<div class="sect2">
+<h3 id="_numeric_operators">12.1. Numeric operators</h3>
 <div class="paragraph"><p><code>+</code> (plus), <code>-</code> (minus), <code>*</code> (times), <code>/</code> (divide),
-<code>%/</code> (integer divide), <code>%%</code> (modulus), <code>**</code> (power)</p></div>
-<div class="paragraph"><p><code>&&</code> (boolean and), <code>||</code> (boolean or),
-<code>==</code> (equals), <code>!=</code> (not equals), <code>></code> (greater than), <code><</code> (less than),
-<code>>=</code> (greater than or equal to), <code><=</code> (less than or equal to)</p></div>
+<code>%/</code> (integer divide), <code>%%</code> (modulus), <code>**</code> (power).</p></div>
+<div class="paragraph"><p><code>==</code> (equals), <code>!=</code> (not equals), <code>></code> (greater than), <code><</code> (less than),
+<code>>=</code> (greater than or equal to), <code><=</code> (less than or equal to).</p></div>
+<div class="paragraph"><p><code>-</code> (negate).</p></div>
+</div>
+<div class="sect2">
+<h3 id="_boolean_operators">12.2. Boolean operators</h3>
+<div class="paragraph"><p><code>&&</code> (boolean and), <code>||</code> (boolean or).</p></div>
 <div class="paragraph"><p><code>xor()</code> is a builtin function.</p></div>
 <div class="paragraph"><p>Swift boolean operators are not short-circuited (to allow maximal
 concurrency).  For conditional execution, use an <code>if</code> statement.</p></div>
 <div class="paragraph"><p>The following unary operators are defined:</p></div>
-<div class="paragraph"><p><code>-</code> (negate), <code>!</code> (boolean not)</p></div>
-<div class="paragraph"><p>String concatenation is also performed with <code>+</code> (plus).  <code>==</code> and
-<code>!=</code> may also be used on strings.  Operator <code>s1/s2</code> is equivalent to
-<code>s1+"/"+s2</code>.</p></div>
+<div class="paragraph"><p><code>!</code> (boolean not).</p></div>
 </div>
+<div class="sect2">
+<h3 id="_string_operators">12.3. String operators</h3>
+<div class="ulist"><ul>
+<li>
+<p>
+String concatenation is also performed with <code>+</code> (plus).
+</p>
+</li>
+<li>
+<p>
+<code>==</code> and <code>!=</code> may also be used on strings.
+</p>
+</li>
+<li>
+<p>
+Operator <code>s1/s2</code> is equivalent to <code>s1+"/"+s2</code>.
+</p>
+</li>
+<li>
+<p>
+The Python-style string format operator <code>format%(arg1,arg2,…)</code> is
+  equivalent to <code>sprintf(format, arg1, arg2,…)</code>.  The parentheses
+  may be omitted for single arguments.
+</p>
+</li>
+</ul></div>
 </div>
+</div>
+</div>
 <div class="sect1">
 <h2 id="_standard_library">13. Standard library</h2>
 <div class="sectionbody">
@@ -2174,12 +2204,12 @@
 <div class="paragraph"><p><strong>Import:</strong> <code>string</code></p></div>
 <div class="dlist"><dl>
 <dt class="hdlist1">
-<code>substring(string s, int start, int length) → string</code>
+<code>substring(string s, int start, int end) → string</code>
 </dt>
 <dd>
 <p>
-Obtain substring of given string <code>s</code> starting at character <code>start</code> and of
-length <code>length</code>
+Obtain substring of given string <code>s</code> starting from character <code>start</code>
+to character <code>end</code>.
 </p>
 </dd>
 <dt class="hdlist1">
@@ -4494,7 +4524,7 @@
 <div id="footnotes"><hr /></div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2015-03-16 11:43:18 CDT
+Last updated 2015-04-06 10:41:00 CDT
 </div>
 </div>
 </body>




More information about the Swift-commit mailing list