table of contents
- NAME
- SYNOPSIS
- Detailed Description
- Constructor & Destructor Documentation
- Member Function Documentation
- Author
- buster 7.4.0-6
std::regex_traits< _Ch_type >(3cxx) | std::regex_traits< _Ch_type >(3cxx) |
NAME¶
std::regex_traits< _Ch_type > - Describes aspects of a regular expression.SYNOPSIS¶
Public Types¶
typedef _RegexMask char_class_type
typedef _Ch_type char_type
typedef std::locale locale_type
typedef std::basic_string< char_type > string_type
Public Member Functions¶
regex_traits ()
Constructs a default traits object. locale_type getloc () const
Gets a copy of the current locale in use by the regex_traits object. locale_type imbue (locale_type __loc)
Imbues the regex_traits object with a copy of a new locale. bool isctype (_Ch_type __c, char_class_type __f) const
Determines if c is a member of an identified class. template<typename _Fwd_iter > char_class_type lookup_classname (_Fwd_iter __first, _Fwd_iter __last, bool __icase=false) const
Maps one or more characters to a named character classification. template<typename _Fwd_iter > string_type lookup_collatename (_Fwd_iter __first, _Fwd_iter __last) const
Gets a collation element by name. template<typename _Fwd_iter > string_type transform (_Fwd_iter __first, _Fwd_iter __last) const
Gets a sort key for a character sequence. template<typename _Fwd_iter > string_type transform_primary (_Fwd_iter __first, _Fwd_iter __last) const
Gets a sort key for a character sequence, independent of case. char_type translate (char_type __c) const
Performs the identity translation. char_type translate_nocase (char_type __c) const
Translates a character into a case-insensitive equivalent. int value (_Ch_type __ch, int __radix) const
Converts a digit to an int.
Static Public Member Functions¶
static std::size_t length (const char_type *__p)
Gives the length of a C-style string starting at __p.
Protected Attributes¶
locale_type _M_locale
Detailed Description¶
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 87 of file regex.h.
Constructor & Destructor Documentation¶
template<typename _Ch_type> std::regex_traits< _Ch_type >::regex_traits () [inline]¶
Constructs a default traits object.Definition at line 164 of file regex.h.
Member Function Documentation¶
template<typename _Ch_type> locale_type std::regex_traits< _Ch_type >::getloc () const [inline]¶
Gets a copy of the current locale in use by the regex_traits object.Definition at line 377 of file regex.h.
template<typename _Ch_type> locale_type std::regex_traits< _Ch_type >::imbue (locale_type __loc) [inline]¶
Imbues the regex_traits object with a copy of a new locale.Parameters:
Returns:
Note:
Definition at line 366 of file regex.h.
template<typename _Ch_type> bool std::regex_traits< _Ch_type >::isctype (_Ch_type __c, char_class_type __f) const¶
Determines if c is a member of an identified class.Parameters:
__f a class type (as returned from lookup_classname).
Returns:
Exceptions:
Definition at line 331 of file regex.tcc.
Referenced by std::regex_traits< _CharType >::lookup_classname().
template<typename _Ch_type> static std::size_t std::regex_traits< _Ch_type >::length (const char_type * __p) [inline], [static]¶
Gives the length of a C-style string starting at __p.Parameters:
Returns:
Definition at line 177 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:
__last one-past-the-end of the character sequence.
__icase ignores the case of the classification name.
Returns:
At least the following names (or their wide-character equivalent) are supported.
- d
- w
- s
- alnum
- alpha
- blank
- cntrl
- digit
- graph
- lower
- punct
- space
- upper
- xdigit
Definition at line 287 of file regex.tcc.
Referenced by std::regex_traits< _CharType >::lookup_collatename().
template<typename _Ch_type > template<typename _Fwd_iter > regex_traits< _Ch_type >::string_type std::regex_traits< _Ch_type >::lookup_collatename (_Fwd_iter __first, _Fwd_iter __last) const¶
Gets a collation element by name.Parameters:
__last one-past-the-end of the collation element name.
Returns:
Definition at line 131 of file regex.tcc.
template<typename _Ch_type> template<typename _Fwd_iter > string_type std::regex_traits< _Ch_type >::transform (_Fwd_iter __first, _Fwd_iter __last) const [inline]¶
Gets a sort key for a character sequence.Parameters:
__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:
Exceptions:
Definition at line 230 of file regex.h.
template<typename _Ch_type> template<typename _Fwd_iter > string_type std::regex_traits< _Ch_type >::transform_primary (_Fwd_iter __first, _Fwd_iter __last) const [inline]¶
Gets a sort key for a character sequence, independent of case.Parameters:
__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
Definition at line 254 of file regex.h.
template<typename _Ch_type> char_type std::regex_traits< _Ch_type >::translate (char_type __c) const [inline]¶
Performs the identity translation.Parameters:
Returns:
Definition at line 188 of file regex.h.
template<typename _Ch_type> char_type std::regex_traits< _Ch_type >::translate_nocase (char_type __c) const [inline]¶
Translates a character into a case-insensitive equivalent.Parameters:
Returns:
Exceptions:
Definition at line 201 of file regex.h.
template<typename _Ch_type> int std::regex_traits< _Ch_type >::value (_Ch_type __ch, int __radix) const¶
Converts a digit to an int.Parameters:
__radix the radix if the numeric conversion (limited to 8, 10, or 16).
Returns:
Definition at line 345 of file regex.tcc.
Referenced by std::regex_traits< _CharType >::isctype().
Author¶
Generated automatically by Doxygen for libstdc++ from the source code.Mon Feb 25 2019 | libstdc++ |