oink 0.1.0

Pig Latin converter written in Rust
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented3 out of 3 items with examples
  • Size
  • Source code size: 8.23 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.23 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • amanharwara

oink

Oink is a English -> Pig Latin translator library & command-line tool written in Rust.

Use as Rust library

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.")}
}

Use as command-line tool

Install using cargo:

cargo install oink

Use command:

oink <STRING>