2021-12-25 22:36:38 +01:00
|
|
|
#pragma once
|
|
|
|
#include <thirdparty/spdlog/include/sinks/basic_file_sink.h>
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Internals
|
2022-01-04 11:53:54 +01:00
|
|
|
BOOL IsBadReadPtrV2(void* ptr);
|
2021-12-26 02:30:20 +01:00
|
|
|
BOOL FileExists(const char* szPath);
|
2021-12-25 22:36:38 +01:00
|
|
|
MODULEINFO GetModuleInfo(const char* szModule);
|
|
|
|
DWORD64 FindPatternSIMD(const char* szModule, const unsigned char* szPattern, const char* szMask);
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Utility
|
|
|
|
void DbgPrint(LPCSTR sFormat, ...);
|
2022-01-19 23:14:50 +01:00
|
|
|
void PrintLastError(void);
|
2022-04-24 19:32:47 +02:00
|
|
|
void HexDump(const char* szHeader, const char* szLogger, const void* pData, int nSize);
|
2022-04-10 19:59:34 +02:00
|
|
|
|
2022-05-30 01:50:21 +02:00
|
|
|
string GetExtension(const string& svInput);
|
|
|
|
string RemoveExtension(const string& svInput);
|
|
|
|
|
2022-06-02 01:55:41 +02:00
|
|
|
string GetFileName(const string& svInput, bool bRemoveExtension, bool bWindows = false);
|
|
|
|
string RemoveFileName(const string& svInput, bool bWindows = false);
|
2022-05-30 01:50:21 +02:00
|
|
|
|
|
|
|
string CreateDirectories(string svInput);
|
2022-04-10 19:59:34 +02:00
|
|
|
string ConvertToWinPath(const string& svInput);
|
2022-04-29 05:30:06 +02:00
|
|
|
string ConvertToUnixPath(const string& svInput);
|
2022-04-10 19:59:34 +02:00
|
|
|
|
|
|
|
string Base64Encode(const string& svInput);
|
|
|
|
string Base64Decode(const string& svInput);
|
|
|
|
|
2022-05-30 01:50:21 +02:00
|
|
|
string UTF8Encode(const wstring& wsvInput);
|
|
|
|
u32string UTF8Decode(const string& svInput);
|
|
|
|
|
2022-05-24 02:23:37 +02:00
|
|
|
bool StringIsDigit(const string& svInput);
|
2022-04-18 16:45:26 +02:00
|
|
|
bool CompareStringAlphabetically(const string& svA, const string& svB);
|
|
|
|
bool CompareStringLexicographically(const string& svA, const string& svB);
|
|
|
|
|
2022-04-10 19:59:34 +02:00
|
|
|
bool StringReplace(string& svInput, const string& svFrom, const string& svTo);
|
2022-06-02 01:55:41 +02:00
|
|
|
string StringReplaceC(const string& svInput, const string& svFrom, const string& svTo);
|
2022-04-10 19:59:34 +02:00
|
|
|
string StringEscape(const string& svInput);
|
|
|
|
string StringUnescape(const string& svInput);
|
2022-05-10 23:32:44 +02:00
|
|
|
|
2022-04-10 19:59:34 +02:00
|
|
|
vector<int> StringToBytes(const string& svInput, bool bNullTerminator);
|
|
|
|
vector<int> PatternToBytes(const string& svInput);
|
2022-05-30 01:50:21 +02:00
|
|
|
vector<int> IntToDigits(int iValue);
|
2021-12-25 22:36:38 +01:00
|
|
|
|
2022-05-10 23:36:01 +02:00
|
|
|
void PrintM128i8(__m128i in);
|
|
|
|
void PrintM128i16(__m128i in);
|
|
|
|
void PrintM128i32(__m128i in);
|
|
|
|
void PrintM128i64(__m128i in);
|
|
|
|
|
2022-05-10 23:32:44 +02:00
|
|
|
string PrintPercentageEscape(const string& svInput);
|
|
|
|
|
2021-12-25 22:36:38 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|