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

Method FindChar

src/core/string_consumer.hpp:554–557  ·  view source on GitHub ↗

* Find first occurrence of 8-bit char 'c'. * @return Offset from current reader position. 'npos' if no match found. */

Source from the content-addressed store, hash-verified

552 * @return Offset from current reader position. 'npos' if no match found.
553 */
554 [[nodiscard]] size_type FindChar(char c) const
555 {
556 return this->Find({&c, 1});
557 }
558 /**
559 * Find first occurrence of UTF-8 char 'c'.
560 * @return Offset from current reader position. 'npos' if no match found.

Callers 2

Calls 1

FindMethod · 0.95

Tested by

no test coverage detected