I have below variable
sen <- "I have a sentence "
I just want to remove spaces from above sentence (all of spaces, beginning end & middle), I know how to use str_trim(sen)
, but that only removes beginning & end spaces.I want to get rid of middle as well
Required Output "I have a sentence"