MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SkipUtf8

Method SkipUtf8

src/core/string_consumer.hpp:438–442  ·  view source on GitHub ↗

* Skip UTF-8 character, and advance reader. * @note The reader is advanced, even if no valid data was present. * @note This behaves different to Utf8View::iterator. * Here we do not skip overlong encodings, because we want to * allow binary data to follow UTF-8 data. */

Source from the content-addressed store, hash-verified

436 * allow binary data to follow UTF-8 data.
437 */
438 void SkipUtf8()
439 {
440 auto len = this->PeekUtf8().first;
441 this->Skip(len > 0 ? len : 1); // advance at least one byte
442 }
443
444 /**
445 * Check whether the next data matches 'str'.

Callers 2

Calls 2

PeekUtf8Method · 0.95
SkipMethod · 0.95

Tested by

no test coverage detected