Skip to main content

indent_string

Function indent_string 

Source
pub fn indent_string(string: &str) -> String
Expand description

Indent each line of string by a single space.

Equivalent to indent_string_with(string, 1, " ", false).

assert_eq!(indent_string("a\nb"), " a\n b");