Function outerspace::prefix_non_whitespace [−][src]
Expand description
Insert a prefix into the string before the first non-whitespace character.
Returns a heap-allocated String.
Example
let prefixed = outerspace::prefix_non_whitespace("\n\nHello hello\n\n", "> ");
assert_eq!(prefixed, "\n\n> Hello hello\n\n");