Registry / utility / normalize-line-endings

normalize-line-endings

JSON →
library0.3.0rscratesunverified

Takes an iterator over chars and returns a new iterator with all line endings (\r, \n, or \r\n) as \n.

# Cargo.toml [dependencies] normalize-line-endings = "0.3.0"
INSTALL
IMPORT
SIG · NORMALIZE-LINE-END
N
normalize-line-endings
utilityrustv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

normalized
✓ use normalize_line_endings::normalized;

Normalizes all line endings to \n.

use normalize_line_endings::normalized; fn main() { let input = "hello\r\nworld\r"; let result: String = normalized(input.chars()).collect(); assert_eq!(result, "hello\nworld\n"); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
normalize-line-endings — cargo add normalize-line-endings · libregistry