kodi
StringValidation.h
1 /*
2  * Copyright (C) 2013-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <string>
12 
14 {
15 public:
16  typedef bool (*Validator)(const std::string &input, void *data);
17 
18  static bool NonEmpty(const std::string &input, void *data) { return !input.empty(); }
19  static bool IsInteger(const std::string &input, void *data);
20  static bool IsPositiveInteger(const std::string &input, void *data);
21  static bool IsTime(const std::string &input, void *data);
22 
23 private:
24  StringValidation() = default;
25 };
Definition: StringValidation.h:13