Function indent::indent_all_with
source · pub fn indent_all_with<'a, S, T>(prefix: S, input: T) -> String
Expand description
Indents every line that is not empty with the given prefix.
§Examples
assert_eq!(format!("items:\n{}", indent::indent_all_with("- ", "foo\nbar\n")),
"items:
- foo
- bar
")
For the version that also indents the first line, see indent_with.