|
Last change
on this file since 050d522 was f40a309, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Unix line breaks.
|
-
Property mode
set to
100644
|
|
File size:
458 bytes
|
| Rev | Line | |
|---|
| [f40a309] | 1 | /*
|
|---|
| 2 | =============================================================================
|
|---|
| 3 | strlen.c -- string length function ala' Unix(tm)
|
|---|
| 4 | Version 1 -- 1987-02-11 -- D.N. Lynx Crowe
|
|---|
| 5 |
|
|---|
| 6 | Returns the number of non-NULL bytes in string argument.
|
|---|
| 7 | =============================================================================
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 | int
|
|---|
| 12 | strlen(s)
|
|---|
| 13 | register char *s;
|
|---|
| 14 | {
|
|---|
| 15 | register int n = 0;
|
|---|
| 16 |
|
|---|
| 17 | while (*s++ != '\0')
|
|---|
| 18 | ++n;
|
|---|
| 19 |
|
|---|
| 20 | return (n);
|
|---|
| 21 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.