MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / xdigitsTo

Function xdigitsTo

source/util.cpp:915–933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

913
914
915template<typename T> T xdigitsTo(LPCTSTR p, LPCTSTR &end)
916{
917 T i = 0;
918 for (;; ++p)
919 {
920 int c = *p;
921 if (c <= '9' && c >= '0')
922 c -= '0';
923 else if (c <= 'F' && c >= 'A')
924 c -= 'A' - 10;
925 else if (c <= 'f' && c >= 'a')
926 c -= 'a' - 10;
927 else
928 break;
929 i = i * 16 + c;
930 }
931 end = p;
932 return i;
933}
934
935
936// istrtoi64(): like _tcstoi64, but allows wrapping overflow consistent with

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected