diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-15 12:36:58 +0300 |
---|---|---|
committer | shfil <filip.gawin@zoho.com> | 2021-01-17 21:33:53 +0100 |
commit | deaaf3d22f69cef5298ba5f18e5a96903d20f15a (patch) | |
tree | b7cc70be5ac6b83ea68830a65e180883011c0c79 /src/extras | |
parent | 448e41ecaa66483c4cf764fdeb66a857a42719cf (diff) |
Migrate from old .ini to new .ini
Diffstat (limited to 'src/extras')
-rw-r--r-- | src/extras/ini_parser.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/extras/ini_parser.hpp b/src/extras/ini_parser.hpp index 8e88bc29..7bea024c 100644 --- a/src/extras/ini_parser.hpp +++ b/src/extras/ini_parser.hpp @@ -158,6 +158,25 @@ namespace linb /* Too lazy to continue this container... If you need more methods, just add it */ + // re3 + void remove(const string_type& sect, const key_type& key) + { + auto it = this->find(sect); + if(it != this->end()) + { + it->second.erase(key); + } + } + + int category_size(const string_type& sect) + { + auto it = this->find(sect); + if(it != this->end()) + { + return it->second.size(); + } + return 0; + } #if 1 bool read_file(const char_type* filename) |