strlen.c 293 B

1234567891011121314151617
  1. /* $Header$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. */
  6. /* return length of s
  7. */
  8. int
  9. strlen(s)
  10. char *s;
  11. {
  12. register char *b = s;
  13. while (*b++)
  14. ;
  15. return b - s - 1;
  16. }