Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/string/byte/strrchr"

From cppreference.com
< cpp‎ | string‎ | byte
m (Text replace - "{{see also}}" to "===See also===")
m (Text replace - "character string" to "byte string")
Line 11: Line 11:
 
{{ddcl list end}}
 
{{ddcl list end}}
  
Finds the last occurrence of the character {{tt|ch}} in the character string pointed to by {{tt|str}}.  
+
Finds the last occurrence of the character {{tt|ch}} in the byte string pointed to by {{tt|str}}.  
  
 
===Parameters===
 
===Parameters===
 
{{param list begin}}
 
{{param list begin}}
{{param list item | str | pointer to the null-terminated character string to be analyzed}}
+
{{param list item | str | pointer to the null-terminated byte string to be analyzed}}
 
{{param list item | ch | character to search for}}
 
{{param list item | ch | character to search for}}
 
{{param list end}}
 
{{param list end}}

Revision as of 02:19, 26 November 2011

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 byte string pointed to by str.

Contents

Parameters

str - pointer to the null-terminated byte 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.

Example

Template:example cpp

See also

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