iterator class
#include <nxt/utf8.hpp>
Iterator over words.
Public types
-
using difference_type = std::
ptrdiff_t -
using iterator_concept = std::
forward_iterator_tag - using value_type = word
Constructors, destructors, conversion operators
- iterator() defaulted
- Construct a default sentinel-comparable iterator.
-
iterator(std::
string_view text) explicit - Construct an iterator at the first word in
text.
Public functions
- auto operator*() const → word noexcept
- Current word.
- auto operator++() → iterator& noexcept
- Advance to the next word.
- auto operator++(int) → iterator noexcept
- Advance to the next word, returning the previous iterator.
Friends
-
auto operator==(const iterator& it,
std::
default_sentinel_t) → bool noexcept