home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / jpl_c / strlen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-05-18  |  640 b   |  25 lines

  1. /* 1.0  07-06-84 */
  2. /************************************************************************
  3.  *            Robert C. Tausworthe                *
  4.  *            Jet Propulsion Laboratory            *
  5.  *            Pasadena, CA 91009        1984        *
  6.  ************************************************************************/
  7.  
  8. #include "defs.h"
  9. #include "stdtyp.h"
  10.  
  11. /************************************************************************/
  12.     int
  13. strlen(s)    /* return length of string s                */
  14.  
  15. /*----------------------------------------------------------------------*/
  16. STRING s;
  17. {
  18.     STRING p;
  19.  
  20.     p = s;
  21.     while (*p)
  22.         p++;
  23.     return (p - s);
  24. }
  25.