pub fn normalize_docstring(doc: &str) -> StringExpand description
Normalize a docstring by trimming outer whitespace and dedenting.
Implements Python’s inspect.cleandoc() behavior:
- Trim leading/trailing whitespace from the entire string
- Find minimum indentation of non-empty lines (skip first line)
- Remove that indentation from all lines
§Examples
let doc = r#"
First line
Second line
Indented line
"#;
let normalized = normalize_docstring(doc);
assert_eq!(normalized, "First line\nSecond line\n Indented line");