diff options
author | Martin Odersky <odersky@gmail.com> | 2007-11-30 08:09:39 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-11-30 08:09:39 +0000 |
commit | 43319c2b2c3e9769d3744b801964a3fabb56ceda (patch) | |
tree | fc195d2024ba1afafa09d6db488e8b590a54f909 | |
parent | 1d4bc5dea53fe7d7c1ed29ea03d23d90988e2d10 (diff) | |
download | scala-43319c2b2c3e9769d3744b801964a3fabb56ceda.tar.gz scala-43319c2b2c3e9769d3744b801964a3fabb56ceda.tar.bz2 scala-43319c2b2c3e9769d3744b801964a3fabb56ceda.zip |
format -> formatted
-rw-r--r-- | src/dotnet-library/scala/runtime/StringAdd.scala | 2 | ||||
-rw-r--r-- | src/library/scala/runtime/StringAdd.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/dotnet-library/scala/runtime/StringAdd.scala b/src/dotnet-library/scala/runtime/StringAdd.scala index 82cb751fff..439b2f7f65 100644 --- a/src/dotnet-library/scala/runtime/StringAdd.scala +++ b/src/dotnet-library/scala/runtime/StringAdd.scala @@ -23,6 +23,6 @@ final class StringAdd(self: Any) { * http://msdn2.microsoft.com/en-us/library/system.string.format(VS.71).aspx * and http://www.codeproject.com/books/0735616485.asp). */ - def format(format: String): String = + def formatted(format: String): String = String.Format(format, Array(self.asInstanceOf[Object])) } diff --git a/src/library/scala/runtime/StringAdd.scala b/src/library/scala/runtime/StringAdd.scala index 8591ae3313..b3cad91df5 100644 --- a/src/library/scala/runtime/StringAdd.scala +++ b/src/library/scala/runtime/StringAdd.scala @@ -25,12 +25,12 @@ final class StringAdd(self: Any) { def +(other: String) = self.toString + other - /** Formats string according to given <code>format</code> string. + /** Returns string formatted according to given <code>format</code> string. * Format strings are as for <code>String.format</code> * (@see java.lang.String.format). * Only works on Java 1.5 or higher! */ - def format(format: String): String = { + def formatted(format: String): String = { // This should be: // String.format(format, Array(self.asInstanceOf[Object])) // However, the line above does not compile on Java 1.4 because String.format exists only in 1.5 |