mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 13:42: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)...);
|
RtlStringCchPrintfA(buffer, VA_BUFFER_SIZE, message, std::forward<Args>(args)...);
|
||||||
return buffer;
|
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