R/internal.R

Defines functions .splitLineBreaks

#' Split line breaks into a vector
#'
#' @note Updated 2021-08-18.
#' @noRd
.splitLineBreaks <- function(x) {
    if (!any(grepl(pattern = "\n", x = x))) {
        return(x)
    }
    x <- strsplit(x = x, split = "\n", fixed = TRUE)
    x <- unlist(x, recursive = TRUE, use.names = FALSE)
    x
}
acidgenomics/r-acidcli documentation built on Oct. 15, 2023, 6:57 p.m.