use unicode_segmentation::UnicodeSegmentation; pub fn reverse(input: &str) -> String { if cfg!(feature = "grapheme") { input.graphemes(true).rev().collect() } else { input.chars().rev().collect() } }