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

View source: R/utils.R

nix_first_newlineR Documentation

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)

Arguments

s

(character) A string

Value

A string with the first instance of a newline removed.

Examples

nix_first_newline("onetwo\nthree\nfour")

# Nothing to remove
nix_first_newline("fivesixseven")

aedobbyn/multicolor documentation built on Jan. 11, 2023, 12:15 a.m.