aboutsummaryrefslogtreecommitdiff
path: root/str_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'str_start.c')
-rw-r--r--str_start.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/str_start.c b/str_start.c
new file mode 100644
index 0000000..757189d
--- /dev/null
+++ b/str_start.c
@@ -0,0 +1,13 @@
+#include "str.h"
+
+int str_start(register const char *s,register const char *t)
+{
+ register char x;
+
+ for (;;) {
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ x = *t++; if (!x) return 1; if (x != *s++) return 0;
+ }
+}