Module bytes

Module bytes 

Source
Expand description

Byte manipulation utilities.

This module provides utilities for working with byte sequences, including pattern matching, escaping, and conversion.

Structs§

EscapedBytes
A wrapper for bytes that implements Display with escaping.

Functions§

escape_bytes
Escape bytes for display.
find_all_patterns
Find all occurrences of a pattern in a byte slice.
find_pattern
Find a pattern in a byte slice.
hexdump
Convert bytes to a human-readable hexdump format.
replace_pattern
Replace all occurrences of a pattern in a byte slice.
strip_ansi
Strip ANSI escape sequences from bytes.
to_visible_string
Convert bytes to a lossy UTF-8 string with control characters visible.
unescape_bytes
Parse an escaped string back to bytes.