ADTF
Loading...
Searching...
No Matches
strings_numeric_traits_decl.h
Go to the documentation of this file.
1
14
15#ifndef A_UTIL_UTIL_STRINGS_STRINGS_NUMERIC_TRAITS_DECL_HEADER_INCLUDED
16#define A_UTIL_UTIL_STRINGS_STRINGS_NUMERIC_TRAITS_DECL_HEADER_INCLUDED
17
18#include <string> //std::string
19#include <cstdint>
20
21namespace a_util {
22namespace strings {
28bool isBool(const std::string& str);
34bool isInt8(const std::string& str);
36bool isInt16(const std::string& str);
38bool isInt32(const std::string& str);
40bool isInt64(const std::string& str);
42bool isUInt8(const std::string& str);
44bool isUInt16(const std::string& str);
46bool isUInt32(const std::string& str);
48bool isUInt64(const std::string& str);
50bool isFloat(const std::string& str);
52bool isDouble(const std::string& str);
53
55bool isBool(const char* str);
57bool isInt8(const char* str);
59bool isInt16(const char* str);
61bool isInt32(const char* str);
63bool isInt64(const char* str);
65bool isUInt8(const char* str);
67bool isUInt16(const char* str);
69bool isUInt32(const char* str);
71bool isUInt64(const char* str);
73bool isFloat(const char* str);
75bool isDouble(const char* str);
76
88 static bool check(const char* from, const bool&);
97 static bool check(const char* from, const std::int8_t&);
99 static bool check(const char* from, const std::int16_t&);
101 static bool check(const char* from, const std::int32_t&);
103 static bool check(const char* from, const std::int64_t&);
105 static bool check(const char* from, const std::uint8_t&);
107 static bool check(const char* from, const std::uint16_t&);
109 static bool check(const char* from, const std::uint32_t&);
111 static bool check(const char* from, const std::uint64_t&);
113 static bool check(const char* from, const float&);
115 static bool check(const char* from, const double&);
116};
117
124template <typename Numeric>
125bool isNumeric(const std::string& str);
126
128template <typename Numeric>
129bool isNumeric(const char* str);
130
131} // namespace strings
132} // namespace a_util
133
137
138#endif // A_UTIL_UTIL_STRINGS_STRINGS_NUMERIC_TRAITS_DECL_HEADER_INCLUDED
Serves as component for string handling and conversion functionality.
Definition strings.h:20
bool isInt64(const std::string &str)
bool isInt8(const std::string &str)
bool isInt16(const std::string &str)
bool isUInt8(const std::string &str)
bool isBool(const std::string &str)
bool isInt32(const std::string &str)
bool isUInt16(const std::string &str)
bool isDouble(const std::string &str)
bool isUInt64(const std::string &str)
bool isNumeric(const char *str)
Definition strings_numeric_traits_impl.h:23
bool isFloat(const std::string &str)
bool isUInt32(const std::string &str)
Serves as the root component, with common functionality documented in core functionality.
Definition base.h:24
Definition strings_numeric_traits_decl.h:80
static bool check(const char *from, const double &)
static bool check(const char *from, const std::uint64_t &)
static bool check(const char *from, const float &)
static bool check(const char *from, const std::uint8_t &)
static bool check(const char *from, const std::uint16_t &)
static bool check(const char *from, const bool &)
static bool check(const char *from, const std::int16_t &)
static bool check(const char *from, const std::int64_t &)
static bool check(const char *from, const std::int32_t &)
static bool check(const char *from, const std::int8_t &)
static bool check(const char *from, const std::uint32_t &)