R/split.R

Defines functions split_txt

Documented in split_txt

#' Split a file according to \code{/NEWQUESTION}
#'
#' @param txt The text to split, in a vector of length one. 
#'
#' @return A vector of character.
#' @importFrom stringr str_trim %>%
#'
split_txt <- function(txt){
  txt %>% 
    strsplit(split="/NEWQUESTION") %>% 
    unlist() %>% 
    str_trim()
}
MarieEtienne/quizin documentation built on Dec. 17, 2021, 3:11 a.m.