Namespaces
Variants
Views
Actions

std::strrchr

From cppreference.com
< cpp‎ | string‎ | byte
Revision as of 17:49, 2 August 2011 by P12bot (Talk | contribs)

Template:cpp/string/narrow/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <cstring>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
const char *strrchr( const char *str, int ch );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
      char *strrchr(       char *str, int ch );
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Finds the last occurrence of the character ch in the character string pointed to by str.

Parameters

str - pointer to the null-terminated character string to be analyzed
ch - character to search for

Return value

pointer to the found character in str, or Template:cpp if no such character is found.

Template:example cpp

Template:see also

Template:cpp/string/narrow/dcl list strchrTemplate:cpp/string/narrow/dcl list strpbrk