Crate bioneer

Source
Expand description

§bioneer - Bionic Reading Library

The bioneer crate is a bionic reading library for Rust that converts text into a bionic reading format. This library enhances the readability and comprehension of text by applying formatting techniques. This crate is a Rust port of the JavaScript library text-vide.

§Usage

To use the bioneer library, add the following dependency to your Cargo.toml file:

[dependencies]
bioneer = "0.1.1"

Then, import the necessary items into your Rust code:

use bioneer::Bionify;

§Bionify Trait

The Bionify trait provides a method for bionifying strings.

§Required Method

use bioneer::Bionify;

let text = "Hello, world!";
let bionified_text = text.bionify();
println!("{}", bionified_text);
// "<b>Hel</b>lo, <b>Wor</b>ld!"

§Examples

Bionify can be used with both String and &str types:

use bioneer::Bionify;

let text = "Hello, world!";
let bionified_text = text.bionify();
println!("{}", bionified_text);
// "<b>Hel</b>lo, <b>Wor</b>ld!"

let owned_text = String::from("Hello, world!");
let owned_bionified_text = owned_text.bionify();
println!("{}", owned_bionified_text);
// "<b>Hel</b>lo, <b>Wor</b>ld!"

Traits§

Bionify
The Bionify trait provides a method for bionifying strings.