$ luarocks install teateatea
Split (pack) a string into a new array or a key-value (kvpack) table with additional options:
pack(str, sp_token) to split a string into a new array ("a;b;c" -> {"a", "b", "c"})
kvpack(str, eq_token, sp_token) to split a string into a kay-value table ("a=b;c=d" -> {a = "b", c = "d"})
with some additional options:
- trim whitespaces before inserting
- drop empty values
- use a separation/equals token string as a dictionary of single byte tokens
for more: https://github.com/Darvame/teateatea
Versions
Dependencies
lua >= 5.1