ocpp 0.24.1
A C++ implementation of the Open Charge Point Protocol
utils.hpp
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2020 - 2023 Pionix GmbH and Contributors to EVerest
3#ifndef OCPP_COMMON_UTILS_HPP
4#define OCPP_COMMON_UTILS_HPP
5
6#include <string>
7#include <tuple>
8#include <vector>
9
10namespace ocpp {
11
13bool iequals(const std::string& lhs, const std::string rhs);
14
15bool is_integer(const std::string& value);
16std::tuple<bool, int> is_positive_integer(const std::string& value);
17bool is_decimal_number(const std::string& value);
18
19bool is_rfc3339_datetime(const std::string& value);
20bool is_boolean(const std::string& value);
21
29std::vector<std::string> split_string(const std::string& string_to_split, const char c, const bool trim = false);
30
36std::string trim_string(const std::string& string_to_trim);
37
38} // namespace ocpp
39
40#endif