//!As oppopsed to functions provided in the anslatortray crate's root, which operate on [`&str`] and [`String`], these functions operate on `&[u8]` and [`Vec<u8>`].
//!
//!TODO the rest
//!In performance-sensitive applications, they can allow for some minor optimizations:
//!* One can reuse buffers for getting the result of a translation (as the functions accept a mutable reference to a [`Vec<u8>`] rather than returning data)
//!* One can avoid the penalty of converting to an [`&str`], translating to a [`String`], and having to convert back to raw bytes if one is working solely with byte-strings.
//!
//!Note that both ASCII and UTF-8 byte strings may be passed to these functions, and that valid ASCII/UTF-8 will be returned.
//!In the past there were "ASCII-only" functions that operated on [`String`]s, but these were removed.
//!These byte_string functions are NOT the sucessors of those functions.
//!Without exception, ALL functions in anslatortray accept both ASCII and UTF-8 text, regardless of whether they operate on byte-strings or char-strings.
//!The modern functions present are faster than the old ASCII ones anyways, even the ones in the crate's root that don't operate on byte-strings.
/* Constants */
@ -35,31 +43,166 @@
/* Functions */
//TODO be sure to mention that if the strings are not ascii, the non-ascii bytes won't be affected
///Translates a multi-word string (including punctuation) into Pig Latin!
///
///Uses the default suffix and special_case_suffix, "ay" and "way" respectively when calling [`translate_with_style()`].
///
///Equivalent to [`translate_way()`].
///
///Note: The resulting translation is appended to the provided buffer, so one may wish to ensure it is cleared before each use or not depending on the application.
///
///# Examples
///
///```
///use anslatortray::byte_string::translate;
///
///let mut buffer = Vec::<u8>::new();
///
///translate(b"Hello world from the coolest Pig Latin translator!", &mut buffer);
//TODO be sure to mention that if the strings are not ascii, the non-ascii bytes won't be affected
///Translates a multi-word string (including punctuation) into Pig Latin (way-style)!
///
///Uses the suffix and special_case_suffix "ay" and "way" respectively when calling [`translate_with_style()`].
///
///Note: The resulting translation is appended to the provided buffer, so one may wish to ensure it is cleared before each use or not depending on the application.
///
///# Examples
///
///```
///use anslatortray::byte_string::translate_way;
///
///let mut buffer = Vec::<u8>::new();
///
///translate_way(b"Hello world from the coolest Pig Latin translator!", &mut buffer);
///translate_way(b"Let's try some edge cases. That is a contraction, as well as a word where the only vowel is y. Neat, all that works!", &mut buffer);
//TODO be sure to mention that if the strings are not ascii, the non-ascii bytes won't be affected
///Translates a multi-word string (including punctuation) into Pig Latin (yay-style)!
///
///Uses the suffix and special_case_suffix "ay" and "yay" respectively when calling [`translate_with_style()`].
///
///Note: The resulting translation is appended to the provided buffer, so one may wish to ensure it is cleared before each use or not depending on the application.
///
///# Examples
///
///```
///use anslatortray::byte_string::translate_yay;
///
///let mut buffer = Vec::<u8>::new();
///
///translate_yay(b"Hello world from the coolest Pig Latin translator!", &mut buffer);
///translate_yay(b"Let's try some edge cases. That is a contraction, as well as a word where the only vowel is y. Neat, all that works!", &mut buffer);