std::char_traits::find - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::char_traits::find

From cppreference.com
< cpp‎ | string‎ | char traits

static const char_type* find( const char_type* p, std::size_t count, const char_type& ch ); |  |

Searches for character `ch` within the first `count` characters of the sequence pointed to by `p`.

### [edit] Parameters

p | - | pointer to a character string to search
count | - | the number of characters to analyze
ch | - | the character to search for

### [edit] Return value

A pointer to the first character in the range specified by `[p, p + count)` that compares equal to `ch`, or NULL if not found.

### [edit] Exceptions

(none)

### [edit] Complexity

Linear in `count`.

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/string/char_traits/find&oldid=62040"