diff options
Diffstat (limited to '')
-rw-r--r-- | src/extras/ini_parser.hpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/extras/ini_parser.hpp b/src/extras/ini_parser.hpp index 99acf1ee..7bea024c 100644 --- a/src/extras/ini_parser.hpp +++ b/src/extras/ini_parser.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 Denilson das Mercês Amorim <dma_2012@hotmail.com> + * Copyright (c) 2013-2015 Denilson das Mercês Amorim <dma_2012@hotmail.com> * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages @@ -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) |