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 e7ca3e4 commit 9d01c46Copy full SHA for 9d01c46
src/libcore/io.rs
@@ -161,6 +161,24 @@ impl reader_util for reader {
161
while !self.eof() { buf += self.read_bytes(2048u); }
162
buf
163
}
164
+
165
+ fn each_byte(it: fn(int) -> bool) {
166
+ while !self.eof() {
167
+ if !it(self.read_byte()) { break; }
168
+ }
169
170
171
+ fn each_char(it: fn(char) -> bool) {
172
173
+ if !it(self.read_char()) { break; }
174
175
176
177
+ fn each_line(it: fn(str) -> bool) {
178
179
+ if !it(self.read_line()) { break; }
180
181
182
183
184
// Reader implementations
0 commit comments