fn is_valid_str(snippet: &str, max_width: usize, shape: Shape) -> bool