Skip to content

hsl-jack-82/Lini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Lini

ini parsing library implemented by pure lua.

guide

load ini file

Lini = require 'Lini'
ini = Lini.load_from_file('test.ini')

load ini from string

Lini = require 'Lini'
ini = Lini.load_from_string('[section]\nabc=111')

write table in ini file

Lini = require 'Lini'

a = {}
a['section'] = {}
a['section']['test'] = 111

Lini.write_to_file('a.ini', a)

write table in ini string

...
ini_str = Lini.write(a)

subsectiron

[section.subsection] will be prased into:

ini = {
  section = {
    subsection = {
      ...
    }
  }
}

ini format

Lines, keys and values' starting and ending Spaces will be removed in praser. If an ini file don't start with a section like [section name], it will be prased into:

ini = {
  k = v,
  k2 = v2,
  ...
}

The format of the comments is ;comments, so you can't use ; in section name, key or value.

About

ini parsing library implemented by pure lua.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages