This is available as SQL\ListFormat in the www repository.
SQL\ListFormat
namespace HH\Lib\SQL; interface ListFormat {...}
->format_d(vec<int> $ints): string
->format_f(vec<float> $floats): string
->format_s(vec<string> $strs): string
->format_upcase_c(vec<string> $cols): string