[−][src]Function sarcasm_utils::encode_sarcasm
pub fn encode_sarcasm(input: &str, start: StartingCase) -> String
Transform normal text into SaRcAsM text.
Arguments
input
- Input string to be transformed.start
- The case of the first letter in the SaRcAsM text.
Returns
Fully transformed string.
Examples
ⓘThis code runs with edition 2018
assert_eq!(encode_sarcasm("Hello World!", StartingCase::Uppercase), "HeLlO WoRlD!"); assert_eq!(encode_sarcasm("Hello World!", StartingCase::Lowercase), "hElLo wOrLd!");