% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{collapse_spaces} \alias{collapse_spaces} \title{Substitue spaces/tabs with single space excluding text within quotes} \usage{ collapse_spaces(x, preserve_newlines = TRUE) } \arguments{ \item{x}{character string} \item{preserve_newlines}{flag to preserve new lines} } \value{ character string } \description{ Written assisted by Claude.ai. It is long and possibly too complicated, but it works } \examples{ collapse_spaces(c("cyl", "di sp","s e d","d e'dl e'")) }