Crate anslatortray

source ·
Expand description

Anslatortray for Rust: A simple Rust library to translate from English to Pig Latin.

Welcome to the Anslatortray Documentation!

Building and Installation

If you wish to use the library in your crate, add anslatortray as a dependency and follow along with the examples below, or check out the rest of the documentation.

See the wiki for more information.

Library Examples

Try compiling this example code:

use anslatortray::translate;

//Prints "Ellohay orldway omfray ethay Anslatortray orfay Ustray!"
println!("{}", translate("Hello world from the Translator for Rust!"));

Anslatortray also supports using the “yay” suffix instead in special cases if you prefer that:

use anslatortray::translate_yay;

//Prints "Utbay Iyay eferpray ethay ayyay-ylestay igpay atinlay!"
println!("{}", translate_yay("But I prefer the yay-style pig latin!"));

It also supports Ferb Latin from Phineas and Ferb:

use anslatortray::translate_ferb;

//Prints "Erewherb's Erryperb?"
println!("{}", translate_ferb("Where's Perry?"));

If none of these suit your needs, you can also choose your own suffixes with translate_with_style()

If you want even more speed than the regular translation functions bring to the table, check out the byte_string module.

Click here to visit the Anslatortray for Rust Git Repository!.

You can also visit the Github or GitLab mirrors to leave issues!

Be sure to check out the crates.io page and the wiki at https://git.jekel.ca/JZJ/anslatortray-rs/wiki.

Anslatortray for Rust is a spiritual sucessor of my original Anslatortray (for C++).

Dependencies

None other than the standard libraries!

Anslatortray Code and Documentation Licence

Copyright (c) 2022 John Jekel

MIT Licensed (see the LICENSE file for details)

Modules

anslatortray Functions Operating on Byte-Strings

Functions

Translates a multi-word string (including punctuation) into Pig Latin!
Translates a multi-word string (including punctuation) into Ferb Latin!
Translates a multi-word string (including punctuation) into Pig Latin (hay-style)!
Translates a multi-word string (including punctuation) into Pig Latin (way-style)!
Translates a multi-word string (including punctuation) into a custom-styled play language!
Translates a multi-word string (including punctuation) into Pig Latin (yay-style)!