R/prep_name.R
trim_spaces.Rd
Removes leading and trailing whitespace and collapses runs of internal whitespace to a single space.
trim_spaces(x)
A character vector.
A character vector with normalized whitespace.
trim_spaces(" JOHN Q PUBLIC ") #> [1] "JOHN Q PUBLIC"