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

Method SkipUtf8If

src/core/string_consumer.hpp:511–517  ·  view source on GitHub ↗

* If the next data matches the UTF-8 char 'c', then skip it. */

Source from the content-addressed store, hash-verified

509 * If the next data matches the UTF-8 char 'c', then skip it.
510 */
511 void SkipUtf8If(char32_t c)
512 {
513 auto [len, result] = this->PeekUtf8();
514 if (len > 0 && result == c) {
515 this->Skip(len);
516 }
517 }
518
519 /**
520 * Peek the next 'len' bytes.

Callers 1

DecodeEncodedStringFunction · 0.80

Calls 2

PeekUtf8Method · 0.95
SkipMethod · 0.95

Tested by

no test coverage detected