![]() |
Home | Libraries | People | FAQ | More |
boost::xpressive::c_regex_traits — Encapsaulates the standard C locale functions for use by the basic_regex<>
class template.
// In header: <boost/xpressive/traits/c_regex_traits.hpp> template<typename Char> struct c_regex_traits { // types typedef ; typedef ; typedef ; typedef ; typedef regex_traits_version_2_tag ; typedef ; // construct/copy/destruct ( = ); // public member functions (c_regex_traits< ) ; (c_regex_traits< ) ; () ; (); // public static functions (); (); (); (); (); (); (, , ); (, , ); template<typename FwdIter> (, ); template<typename FwdIter> (, ); template<typename FwdIter> (, ); template<typename FwdIter> (, , ); (, ); (, ); (); };
c_regex_traits
public
construct/copy/destruct( loc = );
Initialize a c_regex_traits
object to use the global C locale.
c_regex_traits
public member functions(c_regex_traits< ) ;
Checks two c_regex_traits
objects for equality
Returns: |
true. |
(c_regex_traits< ) ;
Checks two c_regex_traits
objects for inequality
Returns: |
false. |
( ch) ;
Returns a string_type
containing all the characters that compare equal disregrarding case to the one passed in. This function can only be called if
is has_fold_case
<c_regex_traits
<Char> >valuetrue
.
Parameters: |
|
||
Returns: |
|
( loc);
No-op
c_regex_traits
public static functions( ch);
Convert a char to a Char
Parameters: |
|
||
Returns: |
ch if Char is char, std::btowc(ch) if Char is wchar_t. |
( ch);
Returns a hash value for a Char in the range [0, UCHAR_MAX]
Parameters: |
|
||
Returns: |
a value between 0 and UCHAR_MAX, inclusive. |
( ch);
No-op
Parameters: |
|
||
Returns: |
ch |
( ch);
Converts a character to lower-case using the current global C locale.
Parameters: |
|
||
Returns: |
std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t. |
( ch);
Converts a character to lower-case using the current global C locale.
Parameters: |
|
||
Returns: |
std::tolower(ch) if Char is char, std::towlower(ch) if Char is wchar_t. |
( ch);
Converts a character to upper-case using the current global C locale.
Parameters: |
|
||
Returns: |
std::toupper(ch) if Char is char, std::towupper(ch) if Char is wchar_t. |
( first, last, ch);
Checks to see if a character is within a character range.
Parameters: |
|
||||||
Returns: |
first <= ch && ch <= last. |
( first, last, ch);
Checks to see if a character is within a character range, irregardless of case.
![]() |
Note |
---|---|
The default implementation doesn't do proper Unicode case folding, but this is the best we can do with the standard C locale functions. |
Parameters: |
|
||||||
Returns: |
in_range(first, last, ch) || in_range(first, last, tolower(ch)) || in_range(first, last, toupper(ch)) |
template<typename FwdIter> ( begin, end);
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).
![]() |
Note |
---|---|
Not currently used |
template<typename FwdIter> ( begin, end);
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) when character case is not considered then v.transform_primary(G1, G2) < v.transform_primary(H1, H2).
![]() |
Note |
---|---|
Not currently used |
template<typename FwdIter> ( begin, end);
Returns a sequence of characters that represents the collating element consisting of the character sequence designated by the iterator range [F1, F2). Returns an empty string if the character sequence is not a valid collating element.
![]() |
Note |
---|---|
Not currently used |
template<typename FwdIter> ( begin, end, icase);
For the character class name represented by the specified character sequence, return the corresponding bitmask representation.
Parameters: |
|
||||||
Returns: |
A bitmask representing the character class. |
( ch, mask);
Tests a character against a character class bitmask.
Parameters: |
|
||||
Requires: |
mask is a bitmask returned by lookup_classname, or is several such masks bit-or'ed together. |
||||
Returns: |
true if the character is a member of any of the specified character classes, false otherwise. |
( ch, radix);
Convert a digit character into the integer it represents.
Parameters: |
|
||||
Requires: |
radix is one of 8, 10, or 16. |
||||
Returns: |
-1 if ch is not a digit character, the integer value of the character otherwise. If char_type is char, std::strtol is used for the conversion. If char_type is wchar_t, std::wcstol is used. |
();
No-op