Overview of rust-shlex
masterThe shlex crate provides a shell-like lexical analyzer for splitting strings into tokens. It mimics the behavior of the Python shlex.split function with default settings that follow the POSIX shell specification.
Key characteristics:
- POSIX Compliance: Mimics POSIX shell splitting behavior.
- Performance: Optimized by working directly on bytes, making it oblivious to UTF-8 high bytes.
- Input Types: Supports both standard Rust strings and byte strings (via the
bytesmodule). - Differences from Python: Unlike the Python
shlexmodule, this implementation does not support customization to maintain speed, and it does not treat\rspecially, which is intended to be more compliant.