| Crates.io | split-paragraphs |
| lib.rs | split-paragraphs |
| version | 0.2.0 |
| created_at | 2024-08-05 01:52:17.695749+00 |
| updated_at | 2024-12-04 01:39:20.185138+00 |
| description | Iterator over paragraphs of a string. |
| homepage | |
| repository | https://github.com/lubomirkurcak/split-paragraphs |
| max_upload_size | |
| id | 1325406 |
| size | 27,772 |
Provides an iterator over paragraphs of a string.
use split_paragraphs::SplitParagraphs;
let text = "foo\r\nbar\n\nbaz\r";
let mut paragraphs = text.paragraphs();
assert_eq!(paragraphs.next(), Some("foo\r\nbar"));
assert_eq!(paragraphs.next(), Some("baz\r"));
assert_eq!(paragraphs.next(), None);
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0 or the MIT license https://opensource.org/licenses/MIT, at your option.