| Home | Libraries | People | FAQ | More

###### string::find_last_not_of (2 of 2 overloads)

Find the last occurrence of a character not equal to `ch`.

<h7> Synopsis </h7>

    std::size_t
    find_last_not_of(
        char ch,
        std::size_t pos = npos) const;

<h7> Description </h7>

Returns the index corrosponding to the last character of `{begin(), begin() + pos}` that is not equal to `ch` if it exists, and `npos` otherwise.

<h7> Complexity </h7>

Linear.

<h7> Return Value </h7>

The last occurrence of a character that is not equal to `ch` before or at the index `pos`, or `npos` if none exists.

<h7> Parameters </h7>

Name | Description
--- | ---
`ch` | The character to ignore.
`pos` | The index to start searching at. The default argument for this parameter is `npos`.