Learn R Programming

multicolor (version 0.1.7)

nix_first_newline: Remove the first instance of a newline from a string

Description

Remove the first instance of a newline from a string

Usage

nix_first_newline(s)

Value

A string with the first instance of a newline removed.

Arguments

s

(character) A string

Examples

Run this code
nix_first_newline("onetwo\nthree\nfour")

# Nothing to remove
nix_first_newline("fivesixseven")

Run the code above in your browser using DataLab