+2025-05-11 Bruno Haible <bruno@clisp.org>
+
+ gen-uni-tables: Fix compilation error (regression 2025-01-03).
+ * lib/gen-uni-tables.c (str_startswith): New function, from
+ lib/str_startswith.c.
+ (str_endswith): New function, from lib/str_endswith.c.
+
2025-05-11 Bruno Haible <bruno@clisp.org>
HACKING: Add documentation regarding link dependencies.
/* ========================================================================= */
+/* Utility functions. */
+
+static bool
+str_startswith (const char *string, const char *prefix)
+{
+ return strncmp (string, prefix, strlen (prefix)) == 0;
+}
+
+static bool
+str_endswith (const char *string, const char *suffix)
+{
+ size_t len = strlen (string);
+ size_t n = strlen (suffix);
+ return len >= n && strcmp (string + len - n, suffix) == 0;
+}
+
+/* ========================================================================= */
+
/* Reading UnicodeData.txt. */
/* See UCD.html. */