0.1.0 |
|
---|
#28 in #read-stream
370KB
221 lines
split_read
See the crate's docs.
lib.rs
:
Key Points
- Can only separate by one byte.
- Always zero-copy.
- Copy/allocate when you need to.
Alternatives
- 🦀
std::io::Lines
makes more sense to use if you need to allocate every line. Otherwise it's slower. - 🦀
slice::split
convenient if you have the entire input in one slice. Faster on tiny inputs, slower on medium or large inputs (faster thanstd::io::Lines
). - 📦
split_by
significantly slower for separating by just one byte than any of the mentioned options, but can separate by multiple patterns of multiple bytes.