String equality check

This commit is contained in:
momo5502 2024-05-10 22:23:47 +02:00
parent 30873e4ebb
commit b9c4d85bb0

View File

@ -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;
}
} }