boost::text::grapheme
// In header: <boost/text/grapheme.hpp> struct grapheme { // types typedef utf_8_to_32_iterator< char const * > const_iterator; // construct/copy/destruct grapheme(); template<code_point_iter I, std::sentinel_for< I > S> grapheme(I, S); grapheme(uint32_t); template<code_point_iter I, std::sentinel_for< I > S> grapheme(utf32_view< I, S >); // public member functions bool empty() const; int distance() const; const_iterator begin() const; const_iterator end() const; bool operator==(grapheme const &) const; bool operator!=(grapheme const &) const; // friend functions std::ostream & operator<<(std::ostream &, grapheme const &); int storage_code_units(grapheme const &); };
An owning sequence of code points that comprise an extended grapheme cluster.
grapheme
public
construct/copy/destructgrapheme();
Default ctor.
template<code_point_iter I, std::sentinel_for< I > S> grapheme(I first, S last);
Constructs *this from the code points [first, last).
Requires: |
The code points in [first, last) comprise at most one grapheme. |
grapheme(uint32_t cp);
Constructs *this from the code point cp.
template<code_point_iter I, std::sentinel_for< I > S> grapheme(utf32_view< I, S > r);
Constructs *this from r.
Requires: |
The code points in r comprise at most one grapheme. |
Requires: |
The code points in [first, last) comprise at most one grapheme. |
grapheme
public member functionsbool empty() const;
Returns true if *this contains no code points.
int distance() const;
Returns the number of code points contained in *this. This is an O(N) operation.
const_iterator begin() const;
const_iterator end() const;
bool operator==(grapheme const & other) const;
bool operator!=(grapheme const & other) const;