summaryrefslogtreecommitdiff
path: root/str_len.c
blob: 38c6e28a0f62e2b0c6505b0d7d204bcd5277ff5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* Public domain. */

#include "str.h"

unsigned int str_len(const char *s)
{
  register const char *t;

  t = s;
  for (;;) {
    if (!*t) return t - s;
    ++t;
    if (!*t) return t - s;
    ++t;
    if (!*t) return t - s;
    ++t;
    if (!*t) return t - s;
    ++t;
  }
}