Crate newline_normalizer

Source
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ยง

ToDosNewlines
Converts any mix of LF (\n) and CR (\r) newlines to CRLF (\r\n).
ToUnixNewlines
Converts any mix of CRLF (\r\n) and CR (\r) newlines to LF (\n).