rev_lines icon indicating copy to clipboard operation
rev_lines copied to clipboard

⏪ Rust Iterator for reading files line by line with a buffer in reverse

Results 5 rev_lines issues
Sort by recently updated
recently updated
newest added

Good day, great library, but missing async support. I've added one for tokio

Hey, I was in the process of copy+modifying this code to instead iterate backwards on all whitespace. However, I realized that this doesn't handle UTF-8 properly. Since UTF-8 is a...

I'm trying to do the following: ``` let lines = if something_is_true { RevLines::new(BufReader::new(file)).unwrap() } else { BufReader::new(file).lines() }; ``` However, this is not a valid Rust syntax since the...

https://users.rust-lang.org/t/count-trailing-zero-bytes-of-a-binary-file/42503/2 ``` use std::env; use std::fs; fn main() { let filename = env::args().nth(1).unwrap(); let buffer = fs::read(filename).unwrap(); let count = buffer.iter().rev().take_while(|b| **b == 0).count(); println!("{}", count); } ``` There are...