extern crate zalgo; use zalgo::{Generator, GeneratorArgs, ZalgoSize}; // Generate a string of Zalgo with a low amount of custom configuration. fn main() { let mut generator = Generator::new(); // Create Zalgo text with Zalgo `char`s in all positions, with a maximum // amount of Zalgo: generator.gen("test", &mut String::new(), &GeneratorArgs::new(true, true, true, ZalgoSize::Maxi)); // Create Zalgo text with Zalgo `char`s in only the middle and lower // positions, with a minimum amount of Zalgo: generator.gen("test", &mut String::new(), &GeneratorArgs::new(false, true, true, ZalgoSize::Mini)); // Create Zalgo text with Zalgo `char`s in only the lower position, with a // random amount of Zalgo (can be a low amount or high amount): generator.gen("test", &mut String::new(), &GeneratorArgs::new(false, false, true, ZalgoSize::None)); // Consequentially, you can also not modify your given text with any Zalgo: // Technically the `ZalgoSize` value given does not matter here. generator.gen("test", &mut String::new(), &GeneratorArgs::new(false, false, false, ZalgoSize::None)); }