std::ctype::scan_is, std::ctype::do_scan_is - cppreference.com (original) (raw)

| Defined in header | | | | ---------------------------------------------------------------------------------------------------- | --- | | | public: const CharT* scan_is( mask m, const CharT* beg, const CharT* end ) const; | (1) | | | protected: virtual const CharT* do_scan_is( mask m, const CharT* beg, const CharT* end ) const; | (2) | |

  1. Public member function, calls the protected virtual member function do_scan_is of the most derived class.

  2. Locates the first character in the character array [beg, end) that satisfies the classification mask m, that is, the first character c such that is(m, c) would return true.

[edit] Parameters

m - mask to search for
beg - pointer to the first character in an array of characters to search
end - one past the end pointer for the array of characters to search

[edit] Return value

Pointer to the first character in [beg, end) that satisfies the mask, or end if no such character was found.

[edit] Example

[edit] Defect reports

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

DR Applied to Behavior as published Correct behavior
LWG 152 C++98 the effect of do_scan_is mentioned is(m),but is does not have such an overload corrected to is(m, c)

[edit] See also

| | locates the first character in a sequence that conforms to given classification, using the classification table (public member function of std::ctype) [edit] | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | locates the first character in a sequence that fails given classification (virtual protected member function) [edit] |