2 releases
0.1.1 | Jun 28, 2023 |
---|---|
0.1.0 | Jun 28, 2023 |
#1567 in Rust patterns
20KB
248 lines
bioneer
- Bionic Reading Library
The bioneer
crate is a Rust port of the JavaScript library text-vide, providing a bionic reading library for converting text into a bionic reading format. This library enhances the readability and comprehension of text by applying formatting techniques. It provides a trait for bionifying strings.
Installation
Add the following dependency to your Cargo.toml
file:
[dependencies]
bioneer = "0.1.1"
Usage
Import the necessary items into your Rust code:
use bioneer::Bionify;
Bionify Trait
The Bionify
trait provides a method for bionifying strings.
Required Method
fn bionify(&self) -> String
This method converts the implementing string into a bionic reading format.
use bioneer::Bionify;
let text = "Hello, world!";
let bionified_text = text.bionify();
println!("{}", bionified_text);
// "<b>Hel</b>lo, <b>Wor</b>ld!"
Hello, World!
License
This crate is distributed under the terms of the MIT license. See the LICENSE file for details.
Dependencies
~2.5–3.5MB
~62K SLoC