public member function
const charT* scan_not (mask m, const charT* low, const charT* high) const;
Return first character not in category
Returns the first character in the range [low,high)
that does not classify as conforming to any of the categories specified in m
. If no such character is found in the range, high
During its operation, the version of this function in the generic template simply calls the virtual protected member do_scan_not
, which is the member function in charge of performing the actions described above.
Conversely, in the char
), this function uses the internal table
to directly return the results.
- Bitmask of member type ctype::mask (inherited from ctype_base) specifying against which category the characters are checked. If the bitmask combines more than one category, the function returns the first character that does not belong to any of the categories.
It may be any bitwise combination of the following member enum values:
For a detailed list of the classification of characters of type char, see the reference for cctype.
- low, high
- Pointer to the initial and final characters of the sequence. The range used is [low,high), which contains all the characters between low and high, including the character pointed by low but not the character pointed by high.
charT is the template parameter of ctype (i.e., the facet's character type).
A pointer to the first element in the range that does not classifies in category m
, or high
if none is found.
is the template parameter of ctype
(i.e., the facet's character type).
// ctype::scan_not example
using namespace std;
int main ()
char period = "November2008";
const char * p = use_facet< ctype<char> >(loc).scan_not ( ctype<char>::alpha, period, period+sizeof(period) );
cout << "The first non-alphabetic character is: " << *p << endl;
The first non-alphabetic character is: 2.
- Classify characters (public member function)
- Return first character in category (public member function)
- Return first character not in category [virtual] (protected virtual member function)