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>
    char *strrchr( const char *s, int c );
    char __far *_fstrrchr( const char __far *s, int c );

Description:
    The strrchr and _fstrrchr functions locate 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.

Returns:
    The strrchr and _fstrrchr functions return a pointer to the located
    character, or a NULL pointer if the character does not occur in the
    string.

See Also:
    strchr, _fstrchr, strpbrk, _fstrpbrk

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

Systems:
     strrchr - All

    _fstrrchr - All

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