aoutils

Function ensure_newline

Source
pub fn ensure_newline(line: &str) -> String
Expand description

Returns a String that ends with a ‘\n’ newline character

§Arguments

  • line - the &str to ensure ends in a newline

§Examples

use aoutils;

let result = aoutils::ensure_newline("alpha");
assert!(result.ends_with("\n"));