aboutsummaryrefslogtreecommitdiff
path: root/string2.h
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-11 17:07:30 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-05-11 17:07:30 +0200
commitc3a38bdbd9e08ba631f34faf408cfac8171dd725 (patch)
tree4977066b97ad95c94cdb312c153e7815057fbf18 /string2.h
parent701b4fa6e78a7eebd8a7df9f51747df9209d23fd (diff)
downloadstring2-c3a38bdbd9e08ba631f34faf408cfac8171dd725.tar.gz
string2-c3a38bdbd9e08ba631f34faf408cfac8171dd725.zip
Move string2.h inside src/
Diffstat (limited to 'string2.h')
-rw-r--r--string2.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/string2.h b/string2.h
deleted file mode 100644
index 228cc8e..0000000
--- a/string2.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-#ifndef __STRING2_H__
-#define __STRING2_H__
-
-#include <string.h>
-
-#define strstarts(str, prefix) (strncmp(str, prefix, strlen(prefix)) == 0)
-
-static int
-strends(const char *str, const char *suffix)
-{
- int offset = strlen(str) - strlen(suffix);
- return offset < 0 ? 0 : strcmp(str + offset, suffix) == 0;
-}
-
-#endif /* __STRING2_H__ */