PrevUpHomeNext

Struct template grapheme_view

boost::text::grapheme_view

Synopsis

// In header: <boost/text/grapheme_view.hpp>

template<code_point_iter I, std::sentinel_for< I > S = I> 
struct grapheme_view :
  public stl_interfaces::view_interface< grapheme_view< I, I > >
{
  // types
  typedef grapheme_iterator< I, S > iterator;
  typedef unspecified               sentinel;

  // construct/copy/destruct
  grapheme_view();
  grapheme_view(iterator, sentinel);
  grapheme_view(I, S);
  template<code_point_iter I2> grapheme_view(I2, I2, I2, I2);

  // public member functions
  constexpr iterator begin() const;
  constexpr sentinel end() const;

  // friend functions
  std::ostream & operator<<(std::ostream &, grapheme_view);
  std::wostream & operator<<(std::wostream &, grapheme_view);
};

Description

A view over graphemes that occur in an underlying sequence of code points.

grapheme_view public construct/copy/destruct

  1. grapheme_view();
  2. grapheme_view(iterator first, sentinel last);

    Construct a grapheme view that covers all the graphemes in [first, last).

  3. grapheme_view(I first, S last);

    Construct a grapheme view that covers all the graphemes in [first, last).

  4. template<code_point_iter I2> 
      grapheme_view(I2 first, I2 view_first, I2 view_last, I2 last);

    Construct a grapheme view that covers only the graphemes in [view_first, view_last).

    [Note] Note

    You should prefer this constructor over the grapheme_view(I, S) constructor if you want to use begin() and end() to traverse parts of [first, last) outside of [view_first, view_last).

grapheme_view public member functions

  1. constexpr iterator begin() const;
  2. constexpr sentinel end() const;

grapheme_view friend functions

  1. std::ostream & operator<<(std::ostream & os, grapheme_view v);

    Stream inserter; performs unformatted output, in UTF-8 encoding.

  2. std::wostream & operator<<(std::wostream & os, grapheme_view v);

    Stream inserter; performs unformatted output, in UTF-16 encoding. Defined on Windows only.


PrevUpHomeNext