## `string::find_first_not_of`

Find the first character missing from the specified string.

### Synopsis

    std::size_t
    find_first_not_of(
        string_view sv,
        std::size_t pos = 0) const noexcept; (1)

    std::size_t
    find_first_not_of(
        char ch,
        std::size_t pos = 0) const noexcept; (2)

### Description

Search from `pos` onward for the first character in this string that is not equal to any of the characters in the string provided as the first argument.

- (1) compares with the characters in `sv`.

- (2) compares with the character `ch`.

### Complexity

- (1) linear in `size()` `+ sv.size()`.

- (2) linear in `size()`.

### Exception Safety

No-throw guarantee.

### Return Value

The index of the found character, or `npos` if none exists.

### Parameters

Name | Description
--- | ---
`sv` | The characters to compare with.
`pos` | The index to start searching at.
`ch` | The character to compare with.

Edit this page