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>
    char *strpbrk( const char *str, const char *charset );
    char __far *_fstrpbrk( const char __far *str,
                           const char __far *charset );
    #include <wchar.h>
    wchar_t *wcspbrk( const wchar_t *str,
                      const wchar_t *charset );
    #include <mbstring.h>
    unsigned char *_mbspbrk( const unsigned char *str,
                             const unsigned char *charset );
    unsigned char __far *_fmbspbrk(
                        const unsigned char __far *str,
                        const unsigned char __far *charset );

Description:
    The strpbrk function locates the first occurrence in the string pointed
    to by str of any character from the string pointed to by charset.

    The _fstrpbrk function is a data model independent form of the strpbrk
    function.  It accepts far pointer arguments and returns a far pointer.
     It is most useful in mixed memory model applications.

    The wcspbrk function is a wide-character version of strpbrk that
    operates with wide-character strings.

    The _mbspbrk function is a multibyte character version of strpbrk that
    operates with multibyte character strings.

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

Returns:
    The strpbrk function returns a pointer to the located character, or NULL
    if no character from charset occurs in str.

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

    void main()
      {
        char *p = "Find all vowels";

        while( p != NULL ) {
          printf( "%s\n", p );
          p = strpbrk( p+1, "aeiouAEIOU" );
        }
      }

    produces the following:

    Find all vowels
    ind all vowels
    all vowels
    owels
    els

Classification:
    strpbrk is ANSI, _fstrpbrk is not ANSI, wcspbrk is ANSI, _mbspbrk is not
    ANSI, _fmbspbrk is not ANSI

Systems:
     strpbrk - All, Netware

    _fstrpbrk - All
    wcspbrk - All
    _mbspbrk - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbspbrk - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    strchr, strrchr, strtok

See Also:

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