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 *strrchr( const char *s, int c );
    char __far *_fstrrchr( const char __far *s, int c );
    #include <wchar.h>
    wchar_t *wcsrchr( const wchar_t *s, wint_t c );
    #include <mbstring.h>
    unsigned char *_mbsrchr( const unsigned char *s,
                             unsigned int c );
    unsigned char __far *_fmbsrchr(
                            const unsigned char __far *s,
                            unsigned int c );

Description:
    The strrchr function locates the last occurrence of c (converted to a
    char) in the string pointed to by s.  The terminating null character is
    considered to be part of the string.

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

    The wcsrchr function is a wide-character version of strrchr that
    operates with wide-character strings.

    The _mbsrchr function is a multibyte character version of strrchr that
    operates with multibyte character strings.

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

Returns:
    The strrchr function returns a pointer to the located character, or a
    NULL pointer if the character does not occur in the string.

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

    void main()
      {
        printf( "%s\n", strrchr( "abcdeabcde", 'a' ) );
        if( strrchr( "abcdeabcde", 'x' ) == NULL )
            printf( "NULL\n" );
      }

    produces the following:

    abcde
    NULL

Classification:
    strrchr is ANSI, _fstrrchr is not ANSI, wcsrchr is ANSI, _mbsrchr is not
    ANSI, _fmbsrchr is not ANSI

Systems:
     strrchr - All, Netware

    _fstrrchr - All
    wcsrchr - All
    _mbsrchr - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbsrchr - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    strchr, strpbrk

See Also:

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