strlen.c 332 B

1234567891011121314151617181920
  1. /* $Id$ */
  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. #include "ack_string.h"
  9. _SIZET
  10. strlen(s)
  11. _CONST char *s;
  12. {
  13. register _CONST char *b = s;
  14. while (*b++)
  15. ;
  16. return b - s - 1;
  17. }