diff options
author | mihaylov <mihaylov@epfl.ch> | 2005-10-04 13:48:31 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2005-10-04 13:48:31 +0000 |
commit | 2a09259c9c419d0afcf6d88c5982adbb8c194c9c (patch) | |
tree | 2712d19027e4cfd5b165a39d87ca8dbf00414235 | |
parent | eb6ce946a28bea61495d0263e0a2dfb4fe5adc85 (diff) | |
download | scala-2a09259c9c419d0afcf6d88c5982adbb8c194c9c.tar.gz scala-2a09259c9c419d0afcf6d88c5982adbb8c194c9c.tar.bz2 scala-2a09259c9c419d0afcf6d88c5982adbb8c194c9c.zip |
*** empty log message ***
-rw-r--r-- | sources/msil/scala/runtime/compat/Platform.scala | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sources/msil/scala/runtime/compat/Platform.scala b/sources/msil/scala/runtime/compat/Platform.scala new file mode 100644 index 0000000000..d47b7f9297 --- /dev/null +++ b/sources/msil/scala/runtime/compat/Platform.scala @@ -0,0 +1,35 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2004, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id$ + + +package scala.runtime.compat; + +object Platform { + def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: int): Unit = + System.Array.Copy(src.asInstanceOf[System.Array], srcPos, dest.asInstanceOf[System.Array], destPos, length); + def getClass(obj: AnyRef) = obj.GetType(); + def getClassName(obj: AnyRef) = obj.GetType().FullName; + def printStackTrace(exc: System.Exception) = + System.Console.WriteLine(exc.StackTrace); + def getMessage(exc: System.Exception) = exc.Message; + def split(str: String, separator: Char): Array[String] = { + val sep = new Array[Char](1); + sep(0) = separator; + str.Split(sep); + } + def parseByte(s: String) : Byte = System.Byte.Parse(s); + def parseShort(s: String) : Short = System.Int16.Parse(s); + def parseInt(s: String) : Int = System.Int32.Parse(s); + def parseLong(s: String) : Long = System.Int64.Parse(s); + def parseFloat(s: String) : Float = System.Single.Parse(s); + def parseDouble(s: String): Double = System.Double.Parse(s); + + def isDigit(c: Char): Boolean = System.Char.IsDigit(c); +} |