From a429b2ea271158fcda8a2f7a5b0179686bab3aa2 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 31 Mar 2018 16:55:15 +0200 Subject: Add a Config::is_in_list() method --- src/config/config.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/config/config.hpp') diff --git a/src/config/config.hpp b/src/config/config.hpp index c5ef15d..9c28e8c 100644 --- a/src/config/config.hpp +++ b/src/config/config.hpp @@ -45,6 +45,11 @@ public: */ static int get_int(const std::string&, const int&); static bool get_bool(const std::string&, const bool); + /** + * Returns true if value is present in a colon-separated list, otherwise + * false. + */ + static bool is_in_list(const std::string& option, const std::string& value); /** * Set a value for the given option. And write all the config * in the file from which it was read if save is true. -- cgit v1.2.3