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

Function IsGarbageCharacter

src/string.cpp:391–400  ·  view source on GitHub ↗

* Test if a unicode character is considered garbage to be skipped. * @param c Character to test. * @returns true iff the character should be skipped. */

Source from the content-addressed store, hash-verified

389 * @returns true iff the character should be skipped.
390 */
391static bool IsGarbageCharacter(char32_t c)
392{
393 if (c >= '0' && c <= '9') return false;
394 if (c >= 'A' && c <= 'Z') return false;
395 if (c >= 'a' && c <= 'z') return false;
396 if (c >= SCC_CONTROL_START && c <= SCC_CONTROL_END) return true;
397 if (c >= 0xC0 && c <= 0x10FFFF) return false;
398
399 return true;
400}
401
402/**
403 * Skip some of the 'garbage' in the string that we don't want to use

Callers 1

SkipGarbageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected