ensure_last_n_empty: Ensure there is one (and only one) blank line at the end of a...

View source: R/utils.R

ensure_last_n_emptyR Documentation

Ensure there is one (and only one) blank line at the end of a vector

Description

Ensure there is one (and only one) blank line at the end of a vector

Usage

ensure_last_n_empty(x, n = 1L)

Examples

styler:::ensure_last_n_empty("")
styler:::ensure_last_n_empty(letters)
styler:::ensure_last_n_empty(c(letters, "", "", ""))

krlmlr/styler documentation built on Dec. 12, 2024, 8:36 a.m.