diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2007-01-31 16:52:33 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2007-01-31 16:52:33 +0000 |
commit | d69bbfb0318d30465bda6e83f77936d2a3ce694b (patch) | |
tree | b9f4992eeead572066e479cb5098ad12d41324ac /src/library | |
parent | 47fd02fe687c9ed19f82baf6322ef0b3ff8455c2 (diff) | |
download | scala-d69bbfb0318d30465bda6e83f77936d2a3ce694b.tar.gz scala-d69bbfb0318d30465bda6e83f77936d2a3ce694b.tar.bz2 scala-d69bbfb0318d30465bda6e83f77936d2a3ce694b.zip |
Fixed some bugs, added test case for Console
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Console.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/library/scala/Console.scala b/src/library/scala/Console.scala index ff1f0ce392..553dda9860 100644 --- a/src/library/scala/Console.scala +++ b/src/library/scala/Console.scala @@ -196,6 +196,18 @@ object Console { */ def readLine: String = in.readLine() + /** Print a formatted text and read a full line from the terminal + * + * @param text the format of the text to print out. + * @param args the parameters used to instantiate the format. + * @return the string read from the terminal. + */ + def readLine(text: String, args: Any*): String = { + format(text, args: _*) + in.readLine() + } + + /** Read a boolean value from the terminal. * * @return the boolean value read from the terminal. |