ini.decode(string)function

Decode an ini string to a Lua table, following those rules :

Parameters

string

ini string to be decoded.

Return value

Returns the corresponding Lua table or a nil value in case of error.

Example

--! luart-extensions import ini -- sample ini string, that contains two sections of key/value fields content = [[ [John] age=32 gender=male [Lena] age=26 gender=female ]] local users = ini.decode(content) -- prints the age of the user John print(users.John.age)