give_newline {catchr}R Documentation

Make a string end with a newline character

Description

give_newline will append a line return ('\n') to the end of a string if it doesn't already end with one. There is also the option to remove any trailing whitespace before doing so.

Usage

give_newline(s, trim = FALSE)

Arguments

s

A string.

trim

Indicates whether to remove trailing whitespace before adding newline.


[Package catchr version 0.2.3 Index]