#line #inclusive #str #string #split-inclusive

no-std lines-inclusive

Split a string into multiple lines, every line may end with

1 unstable release

0.0.0 Jan 28, 2025

#10 in #inclusive

Download history 98/week @ 2025-01-26 34/week @ 2025-02-02 27/week @ 2025-02-09 24/week @ 2025-02-16 18/week @ 2025-02-23 6/week @ 2025-03-02

82 downloads per month
Used in arch-pkg-text

MIT license

4KB

lines-inclusive

Split a string into multiple lines, every line may end with \n

Example

use lines_inclusive::LinesInclusive;

let lines: Vec<_> = "ABC\nDEF\nGHI".lines_inclusive().collect();
assert_eq!(lines, ["ABC\n", "DEF\n", "GHI"]);

License

MIT © Hoàng Văn Khải

No runtime deps