From 45c2488e367dad03726df94cf885c5655d6e47ab Mon Sep 17 00:00:00 2001 From: erorcun Date: Sat, 23 Jan 2021 16:04:19 +0300 Subject: Migrate from old .ini to new .ini --- src/extras/ini_parser.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/extras') 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) -- cgit v1.2.3