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/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    size_t strspn( const char *str,
                   const char *charset );
    size_t _fstrspn( const char __far *str,
                     const char __far *charset );

Description:
    The strspn and _fstrspn functions compute the length of the initial
    segment of the string pointed to by str which consists of characters
    from the string pointed to by charset.  The terminating null character
    is not considered to be part of charset.

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

Returns:
    The strspn and _fstrspn functions return the length of the segment.

See Also:
    strcspn, _fstrcspn

Example:
    #include <stdio.h>
    #include <string.h>

    void main()
      {
        printf( "%d\n", strspn( "out to lunch", "aeiou" ) );
        printf( "%d\n", strspn( "out to lunch", "xyz" ) );
      }

    produces the following:

    2
    0

Classification:
    strspn is ANSI, _fstrspn is not ANSI

Systems:
     strspn - All

    _fstrspn - All

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