R/remove_comments_end_of_line.R

Defines functions remove_comments_end_of_line

Documented in remove_comments_end_of_line

#' Remove comments at the end of a string
#' 
#' @param line A string.
#' @return The string, without the commented part.
#' @export
remove_comments_end_of_line <- function(line)
{
  if(grepl('#',line)) return(substr(line,1,regexpr('#',line)-1))
  else return(line)
}
rogiersbart/rtoolz documentation built on Aug. 20, 2020, 2:48 p.m.