Results for “Streams & byte tools”
Small, practical examples. Search by task or narrow things down below.
Format an integer as padded hexadecimal
Format an integer as padded hexadecimal in a complete Rust program using the standard library.
Rust✓ Tested
Parse a Boolean literal
Parse a Boolean literal in a complete Rust program using the standard library.
Rust✓ Tested
Parse a delimited integer record
Parse a delimited integer record in a complete Rust program using the standard library.
Rust✓ Tested
Parse a hexadecimal integer
Parse a hexadecimal integer in a complete Rust program using the standard library.
Rust✓ Tested
Parse a signed decimal integer
Parse a signed decimal integer in a complete Rust program using the standard library.
Rust✓ Tested
Pass a variable to standard input
Bash Scripts: A here-string supplies the expanded value followed by a newline.
Bash Scripts✓ Tested
Read a fixed-size serial payload
Arduino / C: readBytes returns the number of bytes actually received.
Arduino / C✓ Tested
Read complete lines into an array
Bash Scripts: Mapfile with -t removes each line terminator but preserves other whitespace.
Bash Scripts✓ Tested
Read from a dedicated file descriptor
Bash Scripts: An explicitly opened descriptor keeps the script’s ordinary standard input available.
Bash Scripts✓ Tested
Read null-delimited filenames into an array
Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.
Bash Scripts✓ Tested
Redirect an entire group of commands
Bash Scripts: Brace grouping runs in the current shell and shares a single output redirection.
Bash Scripts✓ Tested
Split simple delimited text in place
C: strtok inserts terminators into a writable buffer and skips repeated delimiter characters.
C✓ Tested