summaryrefslogtreecommitdiff
path: root/src/common/extstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/extstr.h')
-rw-r--r--src/common/extstr.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/extstr.h b/src/common/extstr.h
index 5af572b..0a89639 100644
--- a/src/common/extstr.h
+++ b/src/common/extstr.h
@@ -64,8 +64,14 @@ char *escape_crlf(char *);
/* Borne la taille d'une chaîne à une valeur donnée. */
char *ellipsis(char *, size_t);
+/* Détermine si une chaîne débute par une autre. */
+bool _startswith(const char *, const char *, const char **);
+
/* Détermine si une chaîne se termine par une autre. */
-bool endswith(const char *, const char *);
+bool _endswith(const char *, const char *, const char **);
+
+#define startswith(str, prefix) _startswith(str, prefix, NULL)
+#define endswith(str, suffix) _endswith(str, suffix, NULL)