template<typename _Ch_type>
class std::regex_traits< _Ch_type >
Describes aspects of a regular expression.
A regular expression traits class that satisfies the requirements of section [28.7].
The class regex is parameterized around a set of related types and functions used to complete the definition of its semantics. This class satisfies the requirements of such a traits class.
Definition at line 80 of file regex.h.
template<typename _Ch_type >
template<typename _Fwd_iter >
regex_traits< _Ch_type >::char_class_type std::regex_traits< _Ch_type >::lookup_classname |
( |
_Fwd_iter |
__first, |
|
|
_Fwd_iter |
__last, |
|
|
bool |
__icase = false |
|
) |
| const |
Maps one or more characters to a named character classification.
- Parameters
-
__first | beginning of the character sequence. |
__last | one-past-the-end of the character sequence. |
__icase | ignores the case of the classification name. |
- Returns
- an unspecified value that represents the character classification named by the character sequence designated by the iterator range [__first, __last). If
icase
is true, the returned mask identifies the classification regardless of the case of the characters to be matched (for example, [[:lower:]] is the same as [[:alpha:]]), otherwise a case-dependent classification is returned. The value returned shall be independent of the case of the characters in the character sequence. If the name is not recognized then returns a value that compares equal to 0.
At least the following names (or their wide-character equivalent) are supported.
- d
- w
- s
- alnum
- alpha
- blank
- cntrl
- digit
- graph
- lower
- print
- punct
- space
- upper
- xdigit
Definition at line 283 of file regex.tcc.
template<typename _Ch_type>
template<typename _Fwd_iter >
Gets a sort key for a character sequence.
- Parameters
-
__first | beginning of the character sequence. |
__last | one-past-the-end of the character sequence. |
Returns a sort key for the character sequence designated by the iterator range [F1, F2) such that if the character sequence [G1, G2) sorts before the character sequence [H1, H2) then v.transform(G1, G2) < v.transform(H1, H2).
What this really does is provide a more efficient way to compare a string to multiple other strings in locales with fancy collation rules and equivalence classes.
- Returns
- a locale-specific sort key equivalent to the input range.
- Exceptions
-
std::bad_cast | if the current locale does not have a collate facet. |
Definition at line 223 of file regex.h.
Referenced by std::regex_traits< _CharType >::transform_primary().
template<typename _Ch_type>
template<typename _Fwd_iter >
Gets a sort key for a character sequence, independent of case.
- Parameters
-
__first | beginning of the character sequence. |
__last | one-past-the-end of the character sequence. |
Effects: if typeid(use_facet<collate<_Ch_type> >) == typeid(collate_byname<_Ch_type>) and the form of the sort key returned by collate_byname<_Ch_type>::transform(__first, __last) is known and can be converted into a primary sort key then returns that key, otherwise returns an empty string.
- Todo:
- Implement this function correctly.
Definition at line 247 of file regex.h.