summaryrefslogtreecommitdiff
path: root/str_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'str_start.c')
-rw-r--r--str_start.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/str_start.c b/str_start.c
new file mode 100644
index 0000000..017efc7
--- /dev/null
+++ b/str_start.c
@@ -0,0 +1,15 @@
1/* Public domain. */
2
3#include "str.h"
4
5int str_start(register const char *s,register const char *t)
6{
7 register char x;
8
9 for (;;) {
10 x = *t++; if (!x) return 1; if (x != *s++) return 0;
11 x = *t++; if (!x) return 1; if (x != *s++) return 0;
12 x = *t++; if (!x) return 1; if (x != *s++) return 0;
13 x = *t++; if (!x) return 1; if (x != *s++) return 0;
14 }
15}