summaryrefslogtreecommitdiff
path: root/src/libstddjb/str_start.c
blob: 30396bdd33288fa0e626e4e6200cd9adf6d2c053 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* ISC license. */

#include <skalibs/bytestr.h>

int str_start (register char const *s, register char const *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;
  }
}