Strings In Depth3 / 12
Up next

paste and paste0

# paste joins with a separator (default is a space)
print(paste("hello", "world"))
# paste0 uses no separator
print(paste0("foo", "bar"))
# collapse folds a vector into one string
print(paste(c("a", "b", "c"), collapse = "-"))
What you're solving

join strings, with or without a separator