Dependencies: lib_2da, lib_anon, lib_array, lib_fn, lib_sfo, lib_struct, lib_sugar, lib_tools
Functions to interact with ini files. (Probably quite short, since we probably won't write them and once we've read them in we can use array tools.)
Functions here should begin with 'ini_'
ini_read(backwards:b, flat:b, force_case:[upper|lower])=(array:a, section_array:a) patch
ini_read(backwards:b, flat:b, file:s, path:s, location:s, locbase:s, force_case:[upper|lower])=(array:a, section_array:a) action
Read in a file, or in patch context this file, in the 'ini' format. By default, store it in a 2d array (section,key)-> value. If 'flat' is set, instead store it as (key,value), ignoring sections. If 'backwards' is set, swap key and value. if 'force-case' is set, force the key and value into upper or lower case. Also return a k=>_ array 'section_array' of section keys.
In action context, if path,location, and locbase are all blank, assume an in-game ini file.
Ini entries wrapped in "" will have them stripped.