This function checks if a string ends with a newline character. If not, it adds one.
Examples
cat(withLineEnd("Hello"))
#> Hello
This function checks if a string ends with a newline character. If not, it adds one.
cat(withLineEnd("Hello"))
#> Hello