MCPcopy Create free account
hub / github.com/cinder/Cinder / prior

Function prior

include/utf8cpp/checked.h:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162 template <typename octet_iterator>
163 uint32_t prior(octet_iterator& it, octet_iterator start)
164 {
165 // can't do much if it == start
166 if (it == start)
167 throw not_enough_room();
168
169 octet_iterator end = it;
170 // Go back until we hit either a lead octet or start
171 while (utf8::internal::is_trail(*(--it)))
172 if (it == start)
173 throw invalid_utf8(*it); // error - no lead byte in the sequence
174 return utf8::peek_next(it, end);
175 }
176
177 /// Deprecated in versions that include "prior"
178 template <typename octet_iterator>

Callers 2

iteratorClass · 0.70
operator --Method · 0.70

Calls 4

not_enough_roomClass · 0.85
is_trailFunction · 0.85
invalid_utf8Class · 0.85
peek_nextFunction · 0.70

Tested by

no test coverage detected