diff options
author | michelou <michelou@epfl.ch> | 2006-11-01 16:58:23 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-11-01 16:58:23 +0000 |
commit | 79705f3dbd909743b571e95ed91f0c7ddb321784 (patch) | |
tree | c66899d4ae2f879315493f7aac8af793512bedb0 | |
parent | 40990494c7e8007850ef0e010b0889acfcb77162 (diff) | |
download | scala-79705f3dbd909743b571e95ed91f0c7ddb321784.tar.gz scala-79705f3dbd909743b571e95ed91f0c7ddb321784.tar.bz2 scala-79705f3dbd909743b571e95ed91f0c7ddb321784.zip |
added missing file scala/runtime/RichChar.scala
-rw-r--r-- | src/library/scala/runtime/RichChar.scala | 34 | ||||
-rw-r--r-- | src/library/scala/runtime/RichInt.scala | 4 |
2 files changed, 35 insertions, 3 deletions
diff --git a/src/library/scala/runtime/RichChar.scala b/src/library/scala/runtime/RichChar.scala new file mode 100644 index 0000000000..7badbe0f39 --- /dev/null +++ b/src/library/scala/runtime/RichChar.scala @@ -0,0 +1,34 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2006, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id$ + +package scala.runtime + +import Predef._ + +final class RichChar(c: Char) { + def asDigit: Int = Character.digit(c, 10) + + def isControl: Boolean = Character.isISOControl(c) + def isDigit: Boolean = Character.isDigit(c) + def isISOControl: Boolean = Character.isISOControl(c) + def isLetter: Boolean = Character.isLetter(c) + def isLetterOrDigit: Boolean = Character.isLetterOrDigit(c) + def isLowerCase: Boolean = Character.isLowerCase(c) + def isSpaceChar: Boolean = Character.isSpaceChar(c) + def isTitleCase: Boolean = Character.isTitleCase(c) + def isUnicodeIdentifierPart: Boolean = Character.isUnicodeIdentifierPart(c) + def isUnicodeIdentifierStart: Boolean = Character.isUnicodeIdentifierStart(c) + def isUpperCase: Boolean = Character.isUpperCase(c) + def isWhitespace: Boolean = Character.isWhitespace(c) + + def toLowerCase: Char = Character.toLowerCase(c) + def toTitleCase: Char = Character.toTitleCase(c) + def toUpperCase: Char = Character.toUpperCase(c) +} diff --git a/src/library/scala/runtime/RichInt.scala b/src/library/scala/runtime/RichInt.scala index 178185b14b..d8d3ee5157 100644 --- a/src/library/scala/runtime/RichInt.scala +++ b/src/library/scala/runtime/RichInt.scala @@ -7,12 +7,10 @@ \* */ // $Id$ + package scala.runtime final class RichInt(x: Int) { def until(y: Int): Iterator[Int] = Iterator.range(x, y) def to(y: Int): Iterator[Int] = Iterator.range(x, y + 1) } - - - |