We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc8b967 commit 01c13a3Copy full SHA for 01c13a3
src/lib/io.rs
@@ -356,6 +356,7 @@ type writer =
356
// write_str will continue to do utf-8 output only. an alternative
357
// function will be provided for general encoded string output
358
fn write_str(str s);
359
+ fn write_line(str s);
360
fn write_char(char ch);
361
fn write_int(int n);
362
fn write_uint(uint n);
@@ -392,6 +393,10 @@ state obj new_writer(buf_writer out) {
392
393
fn write_str(str s) {
394
out.write(str::bytes(s));
395
}
396
+ fn write_line(str s) {
397
+ out.write(str::bytes(s));
398
+ out.write(str::bytes("\n"));
399
+ }
400
fn write_char(char ch) {
401
// FIXME needlessly consy
402
out.write(str::bytes(str::from_char(ch)));
0 commit comments