|
template<typename T > |
T | mm::core::util::parseHex (const std::string &s) |
| Parses a hexadecimal string into an unsigned integer of type T. More...
|
|
template<typename T > |
T | mm::core::util::toInteger (const std::vector< std::uint8_t > &data, std::size_t offset=0, Endianness endian=Endianness::LITTLE) |
| Converts a byte sequence to an integer of type T with optional offset and endianness. More...
|
|
std::vector< std::vector< uint8_t > > | mm::core::util::splitIntoParts (const std::vector< uint8_t > &input, size_t partSize) |
| Splits a byte vector into parts of a specified maximum size. More...
|
|
std::vector< uint8_t > | mm::core::util::zipData (const std::string &filename, const std::vector< uint8_t > &data) |
| Compresses a block of data into a ZIP archive containing a single file. More...
|
|
std::unordered_map< std::string, std::vector< uint8_t > > | mm::core::util::unzipData (const std::vector< uint8_t > &data) |
| Unzips a ZIP archive from an in-memory byte buffer. More...
|
|
template<typename T > |
bool | mm::core::util::stringViewToNumber (std::string_view sv, T &result) |
| Converts a string_view to a numeric type. More...
|
|
template<typename T > |
std::vector< uint8_t > | mm::core::util::toBytes (T value, bool bigEndian=false) |
| Converts a trivially copyable value to a byte vector. More...
|
|
template<typename T > |
T | mm::core::util::fromBytes (const std::vector< uint8_t > &bytes, bool bigEndian=false) |
| Reconstructs a value of type T from a byte vector. More...
|
|
std::string | mm::core::util::makeParameterId (int index, int subindex) |
| Formats the given index and subindex into a parameter identifier string. More...
|
|
std::string | mm::core::util::toHex (const std::vector< uint8_t > &data) |
| Converts a vector of bytes to a space-separated hexadecimal string. More...
|
|
template<typename T > |
std::string | mm::core::util::toHex (T value) |
| Converts an integer value to its hexadecimal string representation. More...
|
|
std::vector< uint8_t > | mm::core::util::readBinaryFile (const std::string &filename) |
| Reads the entire contents of a binary file into a byte vector. More...
|
|
std::string | mm::core::util::readTextFile (const std::string &filename) |
| Reads the entire content of a text file into a std::string. More...
|
|
std::string | mm::core::util::joinStrings (const std::vector< std::string > &list, const std::string &delimiter) |
| Joins a list of strings into a single string with a delimiter. More...
|
|
std::string | mm::core::util::formatMacAddress (const std::string &originalMacAddress) |
| Formats a MAC address string to ensure each component is two digits and uppercase. More...
|
|
std::string | mm::core::util::extractIpAddress (const std::string &socketAddress) |
| Extracts the IP address from a socket address string. More...
|
|
unsigned short | mm::core::util::extractPort (const std::string &socketAddress) |
| Extracts the port number from a socket address string. More...
|
|
bool | mm::core::util::endsWith (const std::string &str, const std::string &suffix) |
| Checks whether a string ends with the given suffix. More...
|
|
size_t | mm::core::util::countStringsStartingWith (const std::vector< std::string > &strings, const std::string &prefix) |
| Count how many strings in the list start with the given prefix. More...
|
|
std::vector< std::string > | mm::core::util::split (const std::string &input, char delimiter) |
| Splits a string into substrings based on a delimiter character. More...
|
|
int64_t | mm::core::util::currentTimeMillis () |
| Gets the current system time in milliseconds since the Unix epoch. More...
|
|
template<typename T > |
constexpr T | mm::core::util::linearScale (T value, T inMin, T inMax, T outMin, T outMax) |
|