Expand description
§Key Points
- Can only separate by one byte.
- Always zero-copy.
- Copy/allocate when you need to.
§Alternatives
- 🦀
std::io::Linesmakes more sense to use if you need to allocate every line. Otherwise it’s slower. - 🦀
slice::splitconvenient if you have the entire input in one slice. Faster on tiny inputs, slower on medium or large inputs (faster thanstd::io::Lines). - 📦
split_bysignificantly slower for separating by just one byte than any of the mentioned options, but can separate by multiple patterns of multiple bytes.
Structs§
Enums§
- Piece
- A
Splitread result (fromSplit::next_piece).