TeaTeaTea

A Lua lib (written in C) with functions to split (pack) a string into a new array (or key-value table)

$ 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

1.3-15 years ago(revision: 2)533 downloads

Dependencies

lua >= 5.1

Dependency for

Faketorio

Manifests