collapse_vector function

Collapse a vector of values into a single string when necessary