summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/Iterator.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/library/scala/Iterator.scala b/src/library/scala/Iterator.scala
index db6d682db0..638f837478 100644
--- a/src/library/scala/Iterator.scala
+++ b/src/library/scala/Iterator.scala
@@ -664,6 +664,15 @@ trait Iterator[+A] {
*/
def mkString(sep: String): String = this.mkString("", sep, "")
+ /** Returns a string representation of this iterable object. The string
+ * representations of elements (w.r.t. the method <code>toString()</code>)
+ * are separated by a comma.
+ *
+ * @return a string representation of this iterable object.
+ */
+ def mkString: String =
+ mkString(", ")
+
/** Write all elements of this string into given string builder.
*
* @param buf ...