summaryrefslogtreecommitdiff
path: root/src/dotnet-library
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2007-11-26 12:25:03 +0000
committermichelou <michelou@epfl.ch>2007-11-26 12:25:03 +0000
commit639adcce01aeef1d8161b2e6f3bf0fad16928f15 (patch)
tree327197fad80f2fa504e016e26c20d920bfd82bf3 /src/dotnet-library
parent50a757c94708bba01a60a911d95ba4c6dd2db22c (diff)
downloadscala-639adcce01aeef1d8161b2e6f3bf0fad16928f15.tar.gz
scala-639adcce01aeef1d8161b2e6f3bf0fad16928f15.tar.bz2
scala-639adcce01aeef1d8161b2e6f3bf0fad16928f15.zip
Fixed runtime.StringAdd for MSIL and CLDC
Diffstat (limited to 'src/dotnet-library')
-rw-r--r--src/dotnet-library/scala/runtime/StringAdd.scala28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dotnet-library/scala/runtime/StringAdd.scala b/src/dotnet-library/scala/runtime/StringAdd.scala
new file mode 100644
index 0000000000..82cb751fff
--- /dev/null
+++ b/src/dotnet-library/scala/runtime/StringAdd.scala
@@ -0,0 +1,28 @@
+/* *\
+** ________ ___ __ ___ Scala API **
+** / __/ __// _ | / / / _ | (c) 2002-2007, LAMP/EPFL **
+** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
+** /____/\___/_/ |_/____/_/ |_| **
+** **
+\* */
+
+// $Id$
+
+
+package scala.runtime
+
+
+import Predef._
+
+final class StringAdd(self: Any) {
+
+ def +(other: String) = self.toString + other
+
+ /** Formats string according to given <code>format</code> string.
+ * Format strings are as for <code>String.format</code> (@see
+ * 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 =
+ String.Format(format, Array(self.asInstanceOf[Object]))
+}