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

Method ReadIf

src/core/string_consumer.hpp:454–459  ·  view source on GitHub ↗

* Check whether the next data matches 'str', and skip it. */

Source from the content-addressed store, hash-verified

452 * Check whether the next data matches 'str', and skip it.
453 */
454 [[nodiscard]] bool ReadIf(std::string_view str)
455 {
456 bool result = this->PeekIf(str);
457 if (result) this->Skip(str.size());
458 return result;
459 }
460 /**
461 * If the next data matches 'str', then skip it.
462 */

Callers 15

ReadCharIfMethod · 0.95
ReadUntilMethod · 0.95
SkipUntilMethod · 0.95
SkipIntegerBaseMethod · 0.95
ParseIntListFunction · 0.80
ParseResolutionFunction · 0.80
GetDriverParamFunction · 0.80
FillSetDetailsMethod · 0.80
FillSetDetailsMethod · 0.80
NetworkGameLoopFunction · 0.80
OnReceiveDataMethod · 0.80
ParseCommandLineFunction · 0.80

Calls 3

PeekIfMethod · 0.95
SkipMethod · 0.95
sizeMethod · 0.45

Tested by

no test coverage detected