
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
#include <string.h>
size_t strlen( const char *s );
size_t _fstrlen( const char __far *s );
Description:
The strlen and _fstrlen functions compute the length of the string
pointed to by s.
The _fstrlen function is a data model independent form of the strlen
function that accepts far pointer arguments. It is most useful in mixed
memory model applications.
Returns:
The strlen and _fstrlen functions return the number of characters that
precede the terminating null character.
Example:
#include <stdio.h>
#include <string.h>
void main()
{
printf( "%d\n", strlen( "Howdy" ) );
printf( "%d\n", strlen( "Hello world\n" ) );
printf( "%d\n", strlen( "" ) );
}
produces the following:
5
12
0
Classification:
strlen is ANSI, _fstrlen is not ANSI
Systems:
strlen - All
_fstrlen - All
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson