Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Locates the first character in a range that matches a specified mask.
const CharType *scan_is(
mask _MaskVal,
const CharType* _First,
const CharType* _Last,
) const;
Parameters
_MaskVal
The mask value to be matched by a character._First
A pointer to the first character in the range to be scanned._Last
A pointer to the last character in the range to be scanned.
Return Value
A pointer to the first character in a range that does match a specified mask. If no such value exists, the function returns _Last.
Remarks
The member function returns do_scan_is(_MaskVal, _First, _Last).
Example
// ctype_scan_is.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
using namespace std;
int main( )
{
locale loc1 ( "German_Germany" );
char *string = "Hello, my name is John!";
const char* i = use_facet<ctype<char> > ( loc1 ).scan_is
( ctype_base::punct, &string[0], &string[strlen(&string[0])-1] );
cout << "The first punctuation is \"" << *i << "\" at position: "
<< i - string << endl;
}
The first punctuation is "," at position: 5
Requirements
Header: <locale>
Namespace: std