Category : C Source Code
Archive   : CSRC2.ZIP
Filename : STRLEN.C

 
Output of file : STRLEN.C contained in archive : CSRC2.ZIP
/*
* s t r l e n . c
*/

/*)LIBRARY
*/

#ifdef DOCUMENTATION

title strlen String Length
index String length

synopsis
.s.nf
unsigned int
strlen(s);
char *s;
.s.f
Description

Return the length of the argument string.

Bugs

#endif

#define EOS 0

unsigned int
strlen(s)
register char *s;
/*
* Length of string
*/
{
register char *sp;

for (sp = s; *sp++ != EOS;)
;
return (sp - s - 1);
}


  3 Responses to “Category : C Source Code
Archive   : CSRC2.ZIP
Filename : STRLEN.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/