Crate newline_converter

Source
Expand description

A library for newline character converting.

This crate provides two functions: dos2unix and unix2dos that perform the conversion on strings.

The conversion functions are lazy - they don’t perform any allocations if the input is already in correct format.

Functions§

dos2unix
Converts DOS-style line endings (\r\n) to UNIX-style (\n).
unix2dos
Converts UNIX-style line endings (\n) to DOS-style (\r\n).