read_trimmed_lines: Read lines, thereby trimming empty spaces around the strings...

View source: R/read_trimmed_lines.R

read_trimmed_linesR Documentation

Read lines, thereby trimming empty spaces around the strings and removing empty lines

Description

Read lines, thereby trimming empty spaces around the strings and removing empty lines

Usage

read_trimmed_lines(file, skipNul = TRUE, ...)

Arguments

file

A text file

skipNul

Skip NULL line (passed to readLines)

...

Other paratmers than skipNul passed to readLines

Value

Character vector of trimmed, non-empty lines.

Examples

lines <- "  ABC \n\tHBV\n\nFCB  \n\n"
trimmedLines <- read_trimmed_lines(textConnection(lines))
stopifnot(identical(trimmedLines, c("ABC", "HBV", "FCB")))

ribiosIO documentation built on Feb. 20, 2026, 5:09 p.m.