lua-stringy
lua-stringy copied to clipboard
add `join` function
When I join multiple strings, I don't want to write 'aaa' .. '_' .. 'bbb' .. '_' .. 123
, which is too long; I don't want to use table.concat
either since construct a table is costly. So I add the join
function, which provides a python-style way to join strings, just like ('_'):join('aaa', 'bbb', 123)
, as long as you did string.join = stringy.join
.