.TH "std::sub_match< _BiIter >" 3cxx "Wed Apr 11 2018" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::sub_match< _BiIter > .SH SYNOPSIS .br .PP .PP Inherits \fBstd::pair< _BiIter, _BiIter >\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "typedef __iter_traits::difference_type \fBdifference_type\fP" .br .ti -1c .RI "typedef _BiIter \fBfirst_type\fP" .br .ti -1c .RI "typedef _BiIter \fBiterator\fP" .br .ti -1c .RI "typedef _BiIter \fBsecond_type\fP" .br .ti -1c .RI "typedef \fBstd::basic_string\fP< value_type > \fBstring_type\fP" .br .ti -1c .RI "typedef __iter_traits::value_type \fBvalue_type\fP" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "int \fBcompare\fP (const \fBsub_match\fP &__s) const" .br .ti -1c .RI "int \fBcompare\fP (const \fBstring_type\fP &__s) const" .br .ti -1c .RI "int \fBcompare\fP (const value_type *__s) const" .br .ti -1c .RI "difference_type \fBlength\fP () const" .br .ti -1c .RI "\fBoperator string_type\fP () const" .br .ti -1c .RI "\fBstring_type\fP \fBstr\fP () const" .br .ti -1c .RI "void \fBswap\fP (\fBpair\fP &__p) noexcept(noexcept(swap(\fBfirst\fP, __p\&.first)) &&noexcept(swap(\fBsecond\fP, __p\&.second)))" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "_BiIter \fBfirst\fP" .br .ti -1c .RI "bool \fBmatched\fP" .br .ti -1c .RI "_BiIter \fBsecond\fP" .br .in -1c .SH "Detailed Description" .PP .SS "template .br class std::sub_match< _BiIter >" A sequence of characters matched by a particular marked sub-expression\&. .PP An object of this class is essentially a pair of iterators marking a matched subexpression within a regular expression pattern match\&. Such objects can be converted to and compared with std::basic_string objects of a similar base character type as the pattern matched by the regular expression\&. .PP The iterators that make up the pair are the usual half-open interval referencing the actual original pattern matched\&. .PP Definition at line 824 of file regex\&.h\&. .SH "Member Typedef Documentation" .PP .SS "typedef _BiIter \fBstd::pair\fP< _BiIter , _BiIter >::\fBsecond_type\fP\fC [inherited]\fP" .PP \fCfirst_type\fP is the first bound type .PP Definition at line 99 of file stl_pair\&.h\&. .SH "Member Function Documentation" .PP .SS "template int \fBstd::sub_match\fP< _BiIter >::compare (const \fBsub_match\fP< _BiIter > & __s) const\fC [inline]\fP" .PP Compares this and another matched sequence\&. .PP \fBParameters:\fP .RS 4 \fI__s\fP Another matched sequence to compare to this one\&. .RE .PP \fBReturn values:\fP .RS 4 \fI<0\fP this matched sequence will collate before \fC__s\fP\&. .br \fI=0\fP this matched sequence is equivalent to \fC__s\fP\&. .br \fI<0\fP this matched sequence will collate after \fC__s\fP\&. .RE .PP .PP Definition at line 885 of file regex\&.h\&. .PP Referenced by std::operator!=(), std::operator<(), std::operator<=(), std::operator==(), std::operator>(), and std::operator>=()\&. .SS "template int \fBstd::sub_match\fP< _BiIter >::compare (const \fBstring_type\fP & __s) const\fC [inline]\fP" .PP Compares this sub_match to a string\&. .PP \fBParameters:\fP .RS 4 \fI__s\fP A string to compare to this sub_match\&. .RE .PP \fBReturn values:\fP .RS 4 \fI<0\fP this matched sequence will collate before \fC__s\fP\&. .br \fI=0\fP this matched sequence is equivalent to \fC__s\fP\&. .br \fI<0\fP this matched sequence will collate after \fC__s\fP\&. .RE .PP .PP Definition at line 898 of file regex\&.h\&. .SS "template int \fBstd::sub_match\fP< _BiIter >::compare (const value_type * __s) const\fC [inline]\fP" .PP Compares this sub_match to a C-style string\&. .PP \fBParameters:\fP .RS 4 \fI__s\fP A C-style string to compare to this sub_match\&. .RE .PP \fBReturn values:\fP .RS 4 \fI<0\fP this matched sequence will collate before \fC__s\fP\&. .br \fI=0\fP this matched sequence is equivalent to \fC__s\fP\&. .br \fI<0\fP this matched sequence will collate after \fC__s\fP\&. .RE .PP .PP Definition at line 911 of file regex\&.h\&. .SS "template difference_type \fBstd::sub_match\fP< _BiIter >::length () const\fC [inline]\fP" Gets the length of the matching sequence\&. .PP Definition at line 842 of file regex\&.h\&. .SS "template \fBstd::sub_match\fP< _BiIter >::operator \fBstring_type\fP () const\fC [inline]\fP" .PP Gets the matching sequence as a string\&. .PP \fBReturns:\fP .RS 4 the matching sequence as a string\&. .RE .PP This is the implicit conversion operator\&. It is identical to the str() member function except that it will want to pop up in unexpected places and cause a great deal of confusion and cursing from the unwary\&. .PP Definition at line 855 of file regex\&.h\&. .SS "template \fBstring_type\fP \fBstd::sub_match\fP< _BiIter >::str () const\fC [inline]\fP" .PP Gets the matching sequence as a string\&. .PP \fBReturns:\fP .RS 4 the matching sequence as a string\&. .RE .PP .PP Definition at line 868 of file regex\&.h\&. .PP Referenced by std::sub_match< _Bi_iter >::compare(), and std::operator<<()\&. .SH "Member Data Documentation" .PP .SS "_BiIter \fBstd::pair\fP< _BiIter , _BiIter >::first\fC [inherited]\fP" .PP \fCsecond_type\fP is the second bound type .PP Definition at line 101 of file stl_pair\&.h\&. .SS "_BiIter \fBstd::pair\fP< _BiIter , _BiIter >::second\fC [inherited]\fP" .PP \fCfirst\fP is a copy of the first object .PP Definition at line 102 of file stl_pair\&.h\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.