pub struct Uwu {
pub lowercase: bool,
pub expressions: bool,
pub w_replace: bool,
pub stutter: bool,
pub stutter_chance: u8,
pub emojis: bool,
pub emojis_chance: u8,
}
Expand description
An Uwu
instance capable of running the uwu algorithm.
The simplest way to use it is:
let uwuified = uwu_rs::Uwu::new().uwuify("Hello world!");
But it is also possible to modify its behaviour with:
let uwu = uwu_rs::Uwu::builder()
.lowercase()
.expressions()
.w_replace()
.stutter(4)
.emojis(1)
.build();
let uwuified = uwu.uwuify("Hello world!");
Fields§
§lowercase: bool
Enables the lowercase feature, e.g. ‘Hello’ becomes ‘hello’. Beware that the other features may misbehave if this feature is disabled.
expressions: bool
Enables expression replacement, e.g. ‘what’ becomes ‘nani’.
w_replace: bool
Enables replacement of ‘l’ and ‘r’ with ‘w’, e.g. ‘lovely’ becomes ‘wovewy’.
stutter: bool
Enables stutter, e.g. ‘hello’ becomes ‘h-hello’.
stutter_chance: u8
Specifies how frequent the stutter is. A value of 1 will add stutter to every word, whereas a value of 2 will add stutter every 2 words on average.
emojis: bool
Enables adding emojis after punctuation, e.g. ‘goodbye.’ becomes ‘goodbye. OwO’.
emojis_chance: u8
Specifies how frequently emojis are added. A value of 1 will add emojis after every punctuation, whereas a value of 2 will add emojis every 2 punctuation marks on average.