R/extract_xml_loggers_from_lines.R

Defines functions extract_xml_loggers_from_lines

Documented in extract_xml_loggers_from_lines

#' Extract everything between first loggers and last loggers line
#' @param lines lines of text
#' @return lines of text from the first to and including the last operators line
#' @author Richèl J.C. Bilderbeek
#' @export
extract_xml_loggers_from_lines <- function(
  lines
) {
  first_line <- find_first_regex_line(lines, "<logger id=\"")
  check_true(!is_one_na(first_line))
  last_line <- find_last_regex_line(lines, "</logger>")
  lines[first_line:last_line]
}
richelbilderbeek/beastscriptr documentation built on April 9, 2024, 2:28 p.m.