Files
PluralTechnology/service/spkg/strlib/streq.c
T
2026-07-10 04:08:28 +00:00

31 lines
550 B
C

/*
* Copyright (c) 2026, Chloe M., et al
* Provided under the BSD-3 clause.
*
* Description: Check if two strings are equal
* Author: Chloe M.
*/
#include <ptdef.h>
#include <string.h>
BOOLEAN
RtlStrEq(const CHAR *String1, const CHAR *String2)
{
if (String1 == NULL || String2 == NULL) {
return false;
}
while (*String1 != '\0' && *String2 != '\0') {
if (*String1++ != *String2++) {
return false;
}
}
if (*String1 != *String2) {
return false;
}
return true;
}