Add docs for stdin in core::io.

This commit is contained in:
Steve Klabnik 2013-05-19 12:33:01 -07:00
parent 9f671698e6
commit a389d86fa4

View File

@ -1010,6 +1010,16 @@ pub fn FILE_reader(f: *libc::FILE, cleanup: bool) -> @Reader {
// top-level functions that take a reader, or a set of default methods on
// reader (which can then be called reader)
/**
* Gives a `Reader` that allows you to read values from standard input.
*
* # Examples
* ~~~
* let stdin = core::io::stdin();
* let line = stdin.read_line();
* core::io::print(line);
* ~~~
*/
pub fn stdin() -> @Reader {
unsafe {
@rustrt::rust_get_stdin() as @Reader