mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 05:32:55 +00:00
String equality check
This commit is contained in:
parent
30873e4ebb
commit
b9c4d85bb0
@ -17,4 +17,22 @@ namespace string
|
||||
RtlStringCchPrintfA(buffer, VA_BUFFER_SIZE, message, std::forward<Args>(args)...);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
inline bool equal(const char* s1, const char* s2)
|
||||
{
|
||||
if (!s1)
|
||||
{
|
||||
return !s2;
|
||||
}
|
||||
|
||||
while (*s1)
|
||||
{
|
||||
if (*(s1++) != *(s2++))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return !*s2;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user