aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-06-19 19:06:01 -0700
committerFuwn <[email protected]>2022-06-19 19:06:01 -0700
commitaeee1db7d89ab0e2c2217c96d6b4eeb35a727d2a (patch)
tree800e1a1e5e636aabd2cfcb0e6c350e277c265255
parentfeat(macros): add TATL_IS_NOT (diff)
downloadtatl-aeee1db7d89ab0e2c2217c96d6b4eeb35a727d2a.tar.xz
tatl-aeee1db7d89ab0e2c2217c96d6b4eeb35a727d2a.zip
feat(macros): string equality macros
-rw-r--r--include/tatl/macros.h6
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 */