// Wraps String in an Option. Returns Some when the string adheres to the
// Rewrite constraints defined for the Rewrite trait and None otherwise.
Wraps String in an Option. Returns Some when the string adheres to the
Rewrite constraints defined for the Rewrite trait and None otherwise.
Wraps String in an Option . Returns Some when the string adheres to the Rewrite constraints defined for the Rewrite trait and None otherwise .
pub fn wrap_str(s: String, max_width: usize, shape: Shape) -> Option<String> {
    if is_valid_str(&filter_normal_code(&s), max_width, shape) {
        Some(s)
    } else {
        None
    }
}
pub fn wrap_str ( s : String , max_width : usize , shape : Shape ) -> Option < String > { if is_valid_str ( & filter_normal_code ( & s ) , max_width , shape ) { Some ( s ) } else { None } }
Wraps String in an Option.
Wraps String in an Option .
s
String
max_width
usize
shape
Shape