Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add join function #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add join function #12

wants to merge 1 commit into from

Conversation

luyuhuang
Copy link

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.

@brentp
Copy link
Owner

brentp commented Mar 21, 2020

lgtm. @ncopa

@mdeneen
Copy link

mdeneen commented Sep 16, 2020

I added this change to my fork at https://github.com/mdeneen/lua-stringy and updated the module in luarocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants