Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<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 );
    #include <wchar.h>
    size_t wcslen( const wchar_t *s );
    #include <mbstring.h>
    size_t _mbslen( const unsigned char *s );
    size_t _fmbslen( const unsigned char __far *s );

Description:
    The strlen function computes 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.

    The wcslen function is a wide-character version of strlen that operates
    with wide-character strings.

    The _mbslen function is a multibyte character version of strlen that
    operates with multibyte character strings.

    The _fmbslen function is a data model independent form of the _mbslen
    function that accepts far pointer arguments.  It is most useful in mixed
    memory model applications.

Returns:
    The strlen function returns 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, wcslen is ANSI, _mbslen is not
    ANSI, _fmbslen is not ANSI

Systems:
     strlen - All, Netware

    _fstrlen - All
    wcslen - All
    _mbslen - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbslen - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson