Added string to uint conversion and string splitting to StringService
This commit is contained in:
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user