nxt::utf8::segment_view::iterator class

Iterator over text segments.

Public types

using difference_type = std::ptrdiff_t
using iterator_concept = std::forward_iterator_tag
using value_type = text_segment

Constructors, destructors, conversion operators

iterator() defaulted
Construct a default sentinel-comparable iterator.
iterator(std::string_view text) explicit
Construct an iterator at the first segment in text.

Public functions

auto operator*() const →  text_segment noexcept
Current segment.
auto operator++() →  iterator& noexcept
Advance to the next segment.
auto operator++(int) →  iterator noexcept
Advance to the next segment, returning the previous iterator.

Friends

auto operator==(const iterator& it, std::default_sentinel_t) →  bool noexcept