diff options
Diffstat (limited to 'src/codepoint_iterator.cc')
-rw-r--r-- | src/codepoint_iterator.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/codepoint_iterator.cc b/src/codepoint_iterator.cc index b2f6d81..59cb23b 100644 --- a/src/codepoint_iterator.cc +++ b/src/codepoint_iterator.cc @@ -34,6 +34,11 @@ bool CodepointIterator::operator!=( return this->iterator_ != src; } +std::ptrdiff_t CodepointIterator::operator-( + const std::string::const_iterator& src) const { + return this->iterator_ - src; +} + char32_t CodepointIterator::operator*() { std::uint8_t currByte = *(this->iterator_); char32_t codePoint = 0; |