diff options
Diffstat (limited to '')
-rw-r--r-- | strstarts.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/strstarts.c b/strstarts.c new file mode 100644 index 0000000..ca44e52 --- /dev/null +++ b/strstarts.c @@ -0,0 +1,10 @@ +/* See LICENSE file for copyright and license details. */ +#include "libsimple.h" + + +int +libsimple_strstarts(const char *s, const char *t) +{ + for (; *t && *s == *t; s++, t++); + return !*t; +} |