nushell/crates/nu-protocol
Bahex 469e23cae4
Add bytes split command (#14652)
Related #10708 

# Description

Add `bytes split` command. `bytes split` splits its input on the
provided separator on binary values _and_ binary streams without
collecting. The separator can be a multiple character string or multiple
byte binary.

It can be used when neither `split row` (not streaming over raw input)
nor `lines` (streaming, but can only split on newlines) is right.

The backing iterator implemented in this PR, `SplitRead`, can be used to
implement a streaming `split row` in the future.

# User-Facing Changes

`bytes split` command added, which can be used to split binary values
and raw streams using a separator.

# Tests + Formatting

- 🟢 toolkit fmt
- 🟢 toolkit clippy
- 🟢 toolkit test
- 🟢 toolkit test stdlib

# After Submitting
Mention in release notes.
2024-12-25 07:04:43 -06:00
..
src Add bytes split command (#14652) 2024-12-25 07:04:43 -06:00
tests add function to make env vars case-insensitive (#14390) 2024-12-03 20:47:58 -06:00
Cargo.toml Add bytes split command (#14652) 2024-12-25 07:04:43 -06:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00
README.md Add nu-protocol 2021-09-02 13:29:43 +12:00

nu-protocol

The nu-protocol crate holds the definitions of structs/traits that are used throughout Nushell. This gives us one way to expose them to many other crates, as well as make these definitions available to each other, without causing mutually recursive dependencies.