]> pd.if.org Git - pdclib/blob - functions/string/strlen.c
Added dummy test drivers to each *.c file, and target 'test' to Makefile.
[pdclib] / functions / string / strlen.c
1 /* $Id$ */
2
3 /* Release $Name$ */
4
5 /* strlen( const char * )
6
7    This file is part of the Public Domain C Library (PDCLib).
8    Permission is granted to use, modify, and / or redistribute at will.
9 */
10
11 #include <string.h>
12
13 size_t strlen( const char * s )
14 {
15     size_t rc = 0;
16     while ( s[rc] )
17     {
18         ++rc;
19     }
20     return rc;
21 }
22
23 #warning Test driver missing.
24
25 #ifdef TEST
26 int main()
27 {
28     return 0;
29 }
30 #endif