*/
bool str_starts_with(const char *s, char needle, const char *ignore_chars);
+/**
+ * str_equal - indicate whether two strings are identical
+ * @a: first string to compare
+ * @b: second string to compare
+ *
+ * If both strings are NULL, returns true.
+ */
+bool str_equal(const char *a, const char *b);
+
#endif /* LABWC_STRING_HELPERS_H */
#include "common/mem.h"
#include "common/scaled-scene-buffer.h"
#include "common/scaled-font-buffer.h"
+#include "common/string-helpers.h"
static struct lab_data_buffer *
_create_buffer(struct scaled_scene_buffer *scaled_buffer, double scale)
free(self);
}
-static bool str_equal(const char *a, const char *b)
-{
- return a == b || (a && b && !strcmp(a, b));
-}
-
static bool
_equal(struct scaled_scene_buffer *scaled_buffer_a,
struct scaled_scene_buffer *scaled_buffer_b)
return (s + strspn(s, ignore_chars))[0] == needle;
}
+bool
+str_equal(const char *a, const char *b)
+{
+ return a == b || (a && b && !strcmp(a, b));
+}