Skip to main content

pretty_reformat

Function pretty_reformat 

Source
pub fn pretty_reformat(input: &str) -> String
Expand description

Reformat a compact Debug-style string with indentation and newlines.

Takes a single-line string like {\"a\", \"b\", \"c\"} and produces:

{
    "a",
    "b",
    "c",
}

Handles nested {}, [], () and preserves quoted strings.