| 35 | } |
| 36 | |
| 37 | static u64 convertH(const char *val) // convert hex string to unsigned integer 64bit |
| 38 | { |
| 39 | if(!val || (*val == 0)) return 0; |
| 40 | |
| 41 | char *end; |
| 42 | return _Stoll(val, &end, 16); |
| 43 | /* |
| 44 | u64 ret = 0; u8 n = 0, c; |
| 45 | |
| 46 | if(islike(val, "0x")) n = 2; |
| 47 | |
| 48 | for(u8 i = n; i < 16 + n; i++) |
| 49 | { |
| 50 | if(val[i]==' ') {n++; continue;} |
| 51 | |
| 52 | c = h2b(val[i]); |
| 53 | if(c > 0xF) |
| 54 | return ret; |
| 55 | |
| 56 | ret = (ret << 4) | c; |
| 57 | } |
| 58 | |
| 59 | return ret; |
| 60 | */ |
| 61 | } |
| 62 | |
| 63 | #ifndef LITE_EDITION |
| 64 | static bool isHEX(const char *value) |
no outgoing calls
no test coverage detected