Sdílet prostřednictvím


match_results – třída

Obsahuje řadu submatches.

template<class BidIt,
    class Alloc = allocator<typename iterator_traits<BidIt>::value_type> >
    class match_results {
public:
    explicit match_results(const Alloc& alloc = Alloc());
    match_results(const match_results& right);

    match_results& operator=(const match_results& right);

    difference_type position(size_type sub = 0) const;
    difference_type length(size_type sub = 0) const;
    string_type str(size_type sub = 0) const;
    const_reference operator[](size_type n) const;

    const_reference prefix() const;
    const_reference suffix() const;
    const_iterator begin() const;
    const_iterator end() const;

    template<class OutIt>
        OutIt format(OutIt out,
            const string_type& fmt, match_flag_type flags = format_default) const;
    string_type format(const string_type& fmt,
        match_flag_type flags = format_default) const;

    allocator_type get_allocator() const;
    void swap(const match_results& other) throw();

    size_type size() const;
    size_type max_size() const;
    bool empty() const;

    typedef sub_match<BidIt> value_type;
    typedef const typename Alloc::const_reference const_reference;
    typedef const_reference reference;
    typedef T0 const_iterator;
    typedef const_iterator iterator;
    typedef typename iterator_traits<BidIt>::difference_type difference_type;
    typedef typename Alloc::size_type size_type;
    typedef Alloc allocator_type;
    typedef typename iterator_traits<BidIt>::value_type char_type;
    typedef basic_string<char_type> string_type;
    };

Parametry

  • BidIt
    Typ iterátor pro submatches.

  • Alloc
    Typ alokátoru pro správu paměti.

Poznámky

Popisuje šablony třídy objektu, který určuje neměnitelný pořadí prvků typu sub_match<BidIt> generované hledání regulárního výrazu.Každý prvek odkazuje na subsequence, odpovídající zachycená skupina odpovídá tomuto prvku.

Požadavky

Záhlaví:<regex>

Obor názvů: std

Viz také

Referenční dokumentace

<regex>

Další zdroje

<regex> Členové