Expand description
Normalizes text into Unix (\n) or DOS (\r\n) newline formats, using fast SIMD search and zero-copy when possible.
Optimized for speed and minimal allocations. Returns a Cow<str> to avoid copies
when no change is needed.
Traitsยง
- ToDos
Newlines - Converts any mix of LF (
\n) and CR (\r) newlines to CRLF (\r\n). - ToUnix
Newlines - Converts any mix of CRLF (
\r\n) and CR (\r) newlines to LF (\n).