Skip to content

Commit ebdb0de

Browse files
committed
auto merge of #6620 : steveklabnik/rust/stdin_docs, r=brson
2 parents 9f67169 + a389d86 commit ebdb0de

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/libcore/io.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,16 @@ pub fn FILE_reader(f: *libc::FILE, cleanup: bool) -> @Reader {
10101010
// top-level functions that take a reader, or a set of default methods on
10111011
// reader (which can then be called reader)
10121012

1013+
/**
1014+
* Gives a `Reader` that allows you to read values from standard input.
1015+
*
1016+
* # Examples
1017+
* ~~~
1018+
* let stdin = core::io::stdin();
1019+
* let line = stdin.read_line();
1020+
* core::io::print(line);
1021+
* ~~~
1022+
*/
10131023
pub fn stdin() -> @Reader {
10141024
unsafe {
10151025
@rustrt::rust_get_stdin() as @Reader

0 commit comments

Comments
 (0)