Crates.io | oink |
lib.rs | oink |
version | 0.1.0 |
source | src |
created_at | 2021-01-07 08:34:53.731253 |
updated_at | 2021-01-07 08:34:53.731253 |
description | Pig Latin converter written in Rust |
homepage | https://gitlab.com/amanharwara/oink |
repository | https://gitlab.com/amanharwara/oink |
max_upload_size | |
id | 333627 |
size | 8,233 |
Oink is a English -> Pig Latin translator library & command-line tool written in Rust.
use oink::{word_to_pig_latin, sentence_to_pig_latin};
// Convert a single word to pig latin & print it.
match word_to_pig_latin("Word") {
Some(word) => {println!("{}", word)}
None => {println!("Word")}
}
// Convert a sentence/paragraph(s) to pig latin & print it.
match sentence_to_pig_latin("This is a sentence.") {
Some(sentence) => {println!("{}", sentence)}
None => {println!("This is a sentence.")}
}
Install using cargo
:
cargo install oink
Use command:
oink <STRING>