mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-26 18:04:07 +00:00
Upload
Digital Research
This commit is contained in:
28
CPM OPERATING SYSTEMS/CPM 68K/1.2 SOURCE/6/STRLEN.C
Normal file
28
CPM OPERATING SYSTEMS/CPM 68K/1.2 SOURCE/6/STRLEN.C
Normal file
@@ -0,0 +1,28 @@
|
||||
/**********************************************************************
|
||||
* STRLEN - finds the number of non-null characters in s.
|
||||
*
|
||||
* WORD strlen(s)
|
||||
* BYTE *s;
|
||||
**********************************************************************/
|
||||
|
||||
#include "portab.h"
|
||||
|
||||
WORD strlen(str) /* CLEAR FUNCTION ***********/
|
||||
REG BYTE *str;
|
||||
{
|
||||
REG BYTE *p;
|
||||
for( p = str; *p; p++ ) /* advance *p until NULL. */
|
||||
;
|
||||
return((WORD)p-str);
|
||||
}
|
||||
|
||||
nce *p until NULL. */
|
||||
;
|
||||
return((WORD)p-str);
|
||||
}
|
||||
|
||||
nce *p until NULL. */
|
||||
;
|
||||
return((WORD)p-str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user