Teh Lua Lib, that provides you an easy way to do some stuff with strings:
- pack (split) separated values into a new array table
local table = teateatea.pack(str, separator[, drop_empty, trim_value_whitespaces, multi_separators]);
- pack (split) separated keys and values into a new key-value table
local table = teateatea.kvpack(str, equals, separator[, drop_empty, trim_key_whitespaces, trim_value_whitespaces, multi_equals, multi_separators, swap_empty_key]);
- and etc
checkout example.lua for examples and more info and stuff
git clone https://github.com/Darvame/teateatea.git
cd teateatea
#by default sudo does not pass exported variables
#you may need to run everything bellow (from this point) with root
#in order to use '$ make install'
su -
#or call make with specified variables
make CC=clang
- with pgk-config
export LUAPKG=lua5.2 #or any ('luajit', 'lua5.1', 'lua5.3')
- without pgk-config
# this values are defaults (from luajit), do not set if have the same
export PREFIX=/usr/local #prefix
export LUA_LIBDIR=$PREFIX/lib/lua/5.1 #path to lua libs, used only for '$ make install'
export LUA_INCDIR=-I$PREFIX/include/luajit-2.0 #path to lua headers
export LUA=$PREFIX/bin/luajit #lua executable, used only for '$ make test'
- with clang
export CC=clang #if build on osx
#to build and(or) install
make install
#to build only
make