HyperDbg Debugger
Loading...
Searching...
No Matches
tools.cpp File Reference

general functions used in test project More...

#include "pch.h"

Functions

std::string Uint64ToString (UINT64 value)
 
BOOLEAN StringReplace (std::string &str, const std::string &from, const std::string &to)
 
std::string ConvertToString (char *Str)
 

Detailed Description

general functions used in test project

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2021-04-11

Function Documentation

◆ ConvertToString()

std::string ConvertToString ( char * Str)
34{
35 string s(Str);
36
37 return s;
38}

◆ StringReplace()

BOOLEAN StringReplace ( std::string & str,
const std::string & from,
const std::string & to )
24{
25 size_t start_pos = str.find(from);
26 if (start_pos == string::npos)
27 return FALSE;
28 str.replace(start_pos, from.length(), to);
29 return TRUE;
30}
#define TRUE
Definition BasicTypes.h:55
#define FALSE
Definition BasicTypes.h:54

◆ Uint64ToString()

std::string Uint64ToString ( UINT64 value)
16{
17 ostringstream Os;
18 Os << setw(16) << setfill('0') << hex << value;
19 return Os.str();
20}