streq.h 288 B

123456789101112131415
  1. /// @file
  2. /// @ingroup cgraph_utils
  3. #pragma once
  4. #include <assert.h>
  5. #include <stdbool.h>
  6. #include <stddef.h>
  7. #include <string.h>
  8. /// are `a` and `b` equal?
  9. static inline bool streq(const char *a, const char *b) {
  10. assert(a != NULL);
  11. assert(b != NULL);
  12. return strcmp(a, b) == 0;
  13. }