Add a print and println to std::io

This commit is contained in:
Marijn Haverbeke 2011-10-14 12:44:40 +02:00
parent 5950ae3c0e
commit 3cabe7429f

View file

@ -384,6 +384,9 @@ fn buffered_file_buf_writer(path: str) -> buf_writer {
fn stdout() -> writer { ret new_writer(fd_buf_writer(1, option::none)); }
fn stderr() -> writer { ret new_writer(fd_buf_writer(2, option::none)); }
fn print(s: str) { stdout().write_str(s); }
fn println(s: str) { stdout().write_str(s + "\n"); }
type str_writer =
obj {
fn get_writer() -> writer;