Function encode_sarcasm

Source
pub fn encode_sarcasm(input: &str, start: StartingCase) -> String
Expand description

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

assert_eq!(encode_sarcasm("Hello World!", StartingCase::Uppercase), "HeLlO WoRlD!");
assert_eq!(encode_sarcasm("Hello World!", StartingCase::Lowercase), "hElLo wOrLd!");