mirror of
https://gitea.tendokyu.moe/moegrid/sega-mount.git
synced 2026-10-12 00:58:34 +03:00
首次提交
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <windows.h>
|
||||
|
||||
namespace utils {
|
||||
// 将NTSTATUS转换为0x%08X格式的字符串
|
||||
std::string ntstatus_str(NTSTATUS status);
|
||||
|
||||
// 将十六进制字符串转换为字节数组
|
||||
bool hex_to_bytes(const std::string &hex, uint8_t *out, size_t len);
|
||||
|
||||
// 规范化路径:将/转换为\,不翻倍反斜杠
|
||||
std::wstring normalize_path(const std::wstring &path);
|
||||
|
||||
// 将wstring转为string
|
||||
std::string wstr_to_str(const std::wstring &ws);
|
||||
|
||||
// 将UTF-8 char*字符串转为wstring
|
||||
std::wstring to_wstring(const char *s);
|
||||
|
||||
// 将string转为wstring(UTF-8)
|
||||
std::wstring to_wstring(const std::string &s);
|
||||
|
||||
// 将字节数组格式化为十六进制小写字符串
|
||||
std::string bytes_to_hex(const uint8_t *data, size_t len);
|
||||
}
|
||||
Reference in New Issue
Block a user