Expand description
Grounded Output Truncation Module. Ports the “Middle-Truncation” patterns from Codex-RS to ensure Hematite preserves exit codes and headers while providing line metadata.
Structs§
Functions§
- formatted_
truncate - safe_
head - Returns the longest prefix of
sthat is at mostmax_byteslong and ends on a UTF-8 boundary. - safe_
tail - Returns a suffix of
scontaining at mostmax_bytesbytes, starting on a UTF-8 boundary. - truncate_
middle - Truncate a string by keeping the beginning and end, removing the middle. Ensures UTF-8 safety by finding valid character boundaries.