diff options
Diffstat (limited to 'runit-2.1.2/src/str_len.c')
-rw-r--r-- | runit-2.1.2/src/str_len.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runit-2.1.2/src/str_len.c b/runit-2.1.2/src/str_len.c new file mode 100644 index 0000000..dedd005 --- /dev/null +++ b/runit-2.1.2/src/str_len.c @@ -0,0 +1,16 @@ +/* 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; + } +} |