BBN-V6/lib/libc/slength.c

Compare this file to the similar file:
Show the results in this format:

/* -------------------------- S L E N G T H ------------------------- */
/*
 * curlen = slength(str)
 * Returns the current length of str.
 */
int
slength(s)
   char *s;
   {
   register char *p;

   p = s;
   while(*p++);
   return(p - s - 1);
   }