Checks if a string ends with a newline character. If not, a newline character is appended.
Examples
cat(withLineEnd("Hello"))
#> Hello
Checks if a string ends with a newline character. If not, a newline character is appended.
cat(withLineEnd("Hello"))
#> Hello