home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume12 / cnews / part01 / libc / strings / strlen.c < prev   
Encoding:
Text File  |  1987-10-19  |  218 b   |  17 lines

  1. /*
  2.  * strlen - length of string (not including NUL)
  3.  */
  4. SIZET
  5. strlen(s)
  6. CONST char *s;
  7. {
  8.     register CONST char *scan;
  9.     register SIZET count;
  10.  
  11.     count = 0;
  12.     scan = s;
  13.     while (*scan++ != '\0')
  14.         count++;
  15.     return(count);
  16. }
  17.