MCPcopy Create free account
hub / github.com/MyGUI/mygui / parseUnsignedDecOrHex

Function parseUnsignedDecOrHex

MyGUIEngine/src/msdfgen/main.cpp:72–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static bool parseUnsignedDecOrHex(unsigned &value, const char *arg) {
73 char *end = NULL;
74 if (arg[0] == '0' && (arg[1] == 'x' || arg[1] == 'X')) {
75 arg += 2;
76 value = (unsigned) strtoul(arg, &end, 16);
77 } else
78 value = (unsigned) strtoul(arg, &end, 10);
79 return end > arg && !*end;
80 }
81
82static bool parseUnsignedLL(unsigned long long &value, const char *arg) {
83 if (*arg >= '0' && *arg <= '9') {

Callers 2

parseUnicodeFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected