3 #if defined(_WIN32) && defined(_MSC_VER)
14 #include <string_view>
16 using std::numeric_limits;
18 using std::string_view;
27 static constexpr
int MAX_VALUE { numeric_limits<int>::max() };
28 static constexpr
int MIN_VALUE { -numeric_limits<int>::max() };
35 static bool is(
const string& str);
42 static bool viewIs(
const string_view& str);
49 static int parse(
const string& str);
56 static int viewParse(
const string_view& str);
63 inline static const string encode(
const uint32_t decodedInt) {
65 encode(decodedInt, encodedString);
74 inline static const uint32_t
decode(
const string& encodedString) {
76 decode(encodedString, decodedInt);
85 inline static const uint32_t
viewDecode(
const string_view& encodedString) {
96 static void encode(
const uint32_t decodedInt,
string& encodedString);
103 static bool decode(
const string& encodedString, uint32_t& decodedInt);
110 static bool viewDecode(
const string_view& encodedString, uint32_t& decodedInt);
static bool viewIs(const string_view &str)
Check if given string is a integer string.
static const uint32_t viewDecode(const string_view &encodedString)
Decodes an 6 char string representation to a unsigned 32 bit integer.
static int parse(const string &str)
Parse integer.
static constexpr int MIN_VALUE
static const uint32_t decode(const string &encodedString)
Decodes an 6 char string representation to a unsigned 32 bit integer.
static const string encode(const uint32_t decodedInt)
Encodes an 32 bit unsigned integer to a 6 char string representation.
static int viewParse(const string_view &str)
Parse integer.
static constexpr int MAX_VALUE
static bool is(const string &str)
Check if given string is a integer string.