hazel/lib/strcmp.h

15 lines
255 B
C
Raw Normal View History

2024-07-06 03:51:46 -04:00
#ifndef HAZEL_STRCMP_H_
#define HAZEL_STRCMP_H_
#include <stdint.h>
int strcmp(const char *str1, const char *str2) {
while (*str1 && (*str1 == *str2)) {
str1++;
str2++;
}
return *(uint8_t *)str1 - *(uint8_t *)str2;
}
#endif