PatchworkOS  966e257
A non-POSIX operating system.
Loading...
Searching...
No Matches
notecmp.c
Go to the documentation of this file.
1#include <sys/proc.h>
2
3#include <string.h>
4
5int64_t notecmp(const char* note, const char* word)
6{
7 size_t len = strlen(word);
8 return strncmp(note, word, len) == 0 && (note[len] == '\0' || note[len] == ' ') ? 0 : -1;
9}
int64_t notecmp(const char *note, const char *word)
Helper for comparing note strings.
Definition notecmp.c:5
__INT64_TYPE__ int64_t
Definition stdint.h:16
_PUBLIC int strncmp(const char *s1, const char *s2, size_t n)
Definition strncmp.c:3
_PUBLIC size_t strlen(const char *s)
Definition strlen.c:3