home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / clib / strlen.c < prev   
Encoding:
C/C++ Source or Header  |  1978-03-06  |  339 b   |  20 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: strlen.c,v 1.4 1996/10/19 16:56:29 aros Exp $
  4.  
  5.     Desc: ANSI C function strlen()
  6.     Lang: english
  7. */
  8. #include <string.h>
  9. #include <exec/types.h>
  10.  
  11. size_t strlen (const char * ptr)
  12. {
  13.     const char * start = ptr;
  14.  
  15.     while (*ptr) ptr ++;
  16.  
  17.     return (IPTR)ptr - (IPTR)start;
  18. }
  19.  
  20.