소스 검색

Merge pull request #72 from hallzy/add_join_to_docs

Added the list join method to the docs
Marco Bambini 8 년 전
부모
커밋
bc55b0e553
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      docs/lists.html

+ 8 - 0
docs/lists.html

@@ -125,6 +125,14 @@
 	var v1 = list.pop();	// pop 100
 	var v2 = list.pop();	// pop 50
 			</code></pre>
+
+			<h4 class="section-h4">List Joins</h4>
+			<p>The List class implements the join method as a convenient way to
+			interpret a list as a string:</p> 
+			<pre><code class="swift">
+	var list = [1,2,3,4,5];
+	list.join(" + "); // Becomes: "1 + 2 + 3 + 4 + 5"
+			</code></pre>
        	</div> <!-- /row -->
        </div> <!-- /main-content -->
      </div> <!-- /container -->