diff options
| author | Fuwn <[email protected]> | 2022-06-19 19:06:01 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-06-19 19:06:01 +0000 |
| commit | 29e24ea56d5c8222a5df4c8e61914235985de3f2 (patch) | |
| tree | 800e1a1e5e636aabd2cfcb0e6c350e277c265255 | |
| parent | feat(macros): add TATL_IS_NOT (diff) | |
| download | tatl-29e24ea56d5c8222a5df4c8e61914235985de3f2.tar.xz tatl-29e24ea56d5c8222a5df4c8e61914235985de3f2.zip | |
feat(macros): string equality macros
| -rw-r--r-- | include/tatl/macros.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/tatl/macros.h b/include/tatl/macros.h index 3496851..7b1cc27 100644 --- a/include/tatl/macros.h +++ b/include/tatl/macros.h @@ -55,4 +55,10 @@ /* Evaluate two values' inequality */ #define TATL_IS_NOT(a, b) (a != b) +/* Evaluate two strings' equality */ +#define TATL_STR_IS(a, b) (strcmp(a, b) == 0) + +/* Evaluate two strings' inequality */ +#define TATL_STR_IS_NOT(a, b) (strcmp(a, b) != 0) + #endif /* TATL_MACROS */ |