19 releases (breaking)
|0.17.0||Mar 7, 2023|
|0.16.0||Nov 27, 2022|
|0.15.0||Nov 27, 2022|
|0.12.0||Jun 16, 2022|
|0.5.0||Jul 14, 2021|
#478 in Text processing
150 downloads per month
Used in 3 crates (2 directly)
This repository hosts a project to define a text format called Basic Text, a subset of Unicode that focuses on text: it excludes unprintable control characters, characters which depend on out-of-band information to interpret, non-characters, deprecated characters, and more, while aiming to preserve everything of practical use to plain text and formats built on top of it. See the Book for more information.
It also includes a Rust crate which aims to implement the Basic Text format, providing several utilities:
TextStrare similar to the standard library's
str, but use the Basic Text string format, along with a
text!("...")macro for Basic Text string literals.
TextWriterare input and output streams which use the Basic Text stream format. On input, content is converted in a way which is lossy with respect to the original bytestream. Output uses the "strict" conversion method, in which invalid content is diagnosed with errors.
BufReadText, an extension trait that adds
BufReadimplementations for reading lines from an input stream as
Duplexfor reading and writing on an interactive stream using Basic Text.
The code here is usable, and implements everything in the Basic Text spec, but is not very mature or optimized yet.