Learn R Programming

FastRet (version 1.3.0)

withLineEnd: Add line end

Description

Checks if a string ends with a newline character. If not, a newline character is appended.

Usage

withLineEnd(x)

Value

The input string with a newline character at the end if it was not already present.

Arguments

x

A string.

Examples

Run this code
cat(withLineEnd("Hello"))

Run the code above in your browser using DataLab