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

lua字符串分割函数[适配中文特殊符号混合] #8

Open
0x7A7A6572 opened this issue Jun 28, 2022 · 0 comments
Open

lua字符串分割函数[适配中文特殊符号混合] #8

0x7A7A6572 opened this issue Jun 28, 2022 · 0 comments

Comments

@0x7A7A6572
Copy link
Owner

https://zzerx.cn/2020/01/02/lua%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%88%86%E5%89%B2%E5%87%BD%E6%95%B0%5B%E9%80%82%E9%85%8D%E4%B8%AD%E6%96%87%E7%89%B9%E6%AE%8A%E7%AC%A6%E5%8F%B7%E6%B7%B7%E5%90%88%5D/

lua的官方函数里无字符串分割,起初写了个简单的,随之发现如果是中文、字符串、特殊符号就会出现分割错误的情况,所以就有了这个zsplit.function zsplit(strn, chars) function stringPatch(str) --格式化输入包含特殊符号的分割字符

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

No branches or pull requests

1 participant