Added string to uint conversion and string splitting to StringService

This commit is contained in:
Nav
2024-02-12 19:17:19 +00:00
parent a4c08c1b0a
commit 3a69647159
2 changed files with 38 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include <string>
#include <string_view>
#include <cstdint>
#include <vector>
@@ -20,5 +21,12 @@ namespace Services
static std::string toHex(unsigned char value);
static std::string toHex(const std::vector<unsigned char>& data);
static std::string toHex(const std::string& data);
static std::uint64_t toUint64(const std::string& str);
static std::uint32_t toUint32(const std::string& str);
static std::uint16_t toUint16(const std::string& str);
static std::uint8_t toUint8(const std::string& str);
static std::vector<std::string_view> split(std::string_view str, char delimiter);
};
}