|
|
1.1 root 1: # include <sccs.h>
2:
3: SCCSID(@(#)length.c 8.1 12/31/84)
4:
5: /*
6: ** FIND STRING LENGTH
7: **
8: ** The length of string `s' (excluding the null byte which
9: ** terminates the string) is returned.
10: */
11:
12: length(s)
13: char *s;
14: {
15: register int l;
16: register char *p;
17:
18: l = 0;
19: p = s;
20: while (*p++)
21: l++;
22: return(l);
23: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.