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

Function IsSccEncodedCode

src/string.cpp:94–107  ·  view source on GitHub ↗

* Test if a character is (only) part of an encoded string. * @param c Character to test. * @returns True iff the character is an encoded string control code. */

Source from the content-addressed store, hash-verified

92 * @returns True iff the character is an encoded string control code.
93 */
94static bool IsSccEncodedCode(char32_t c)
95{
96 switch (c) {
97 case SCC_RECORD_SEPARATOR:
98 case SCC_ENCODED:
99 case SCC_ENCODED_INTERNAL:
100 case SCC_ENCODED_NUMERIC:
101 case SCC_ENCODED_STRING:
102 return true;
103
104 default:
105 return false;
106 }
107}
108
109/**
110 * Copies the valid (UTF-8) characters from \c consumer to the \c builder.

Callers 1

StrMakeValidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected