Strings In Depth4 / 12
Up next

trimws

s <- "   padded   "
# trimws removes leading and trailing whitespace
print(trimws(s))
What you're solving

strip surrounding whitespace