Schmfy/README.md

23 lines
898 B
Markdown
Raw Normal View History

2023-07-07 11:24:22 +02:00
# Schmfy library
2023-07-07 18:23:39 +02:00
This library is able to schmfy any text.
2023-07-07 11:24:22 +02:00
## Usage
2023-07-07 18:23:39 +02:00
Example usage:
```rust
use schmfy::schmfy;
fn improve_text(text: &str) {
let improved_text = schmfy(text);
println!("Old and boring: {}", text);
2023-10-24 15:53:46 +02:00
println!("Improved and great: {}", improved_text);
2023-07-07 18:23:39 +02:00
}
```
2024-05-10 14:32:05 +02:00
The library can be compiled to WebAssembly. You will need wasm-pack (`cargo install wasm-pack`) and can then build the library with `wasm-pack build --target web`. This generates a `pkg` folder which can be used in web environments.
2023-07-07 18:23:39 +02:00
## Capabilities
The schmfication capabilities are able to preserve text case and any non-alphabetical characters.
If a non-alphabetical character is between two alphabetical strings, both of the alphabetical strings will be interpreted as completely separate words.
2024-05-10 14:32:05 +02:00
For example, the HTML code `<span>Entry<br></span>` will be converted into `<schman>Schmentry<schmer></schman>`.