join a table of strings with a specified separator


local du = require "lib/dtutils"
local result = du.join(tabl, pat)

tabl - table - a table of strings
pat - string - a separator


join assembles a table of strings into a string with the specified pattern in between each string


result - string - the joined string on success, or an empty string on failure


join({a, "long", "path", "name", "to", a, "file.txt"}, " ")

would return the string “a long path name to a file.txt”