MCPcopy Create free account
hub / github.com/ddnet/ddnet / hexval

Function hexval

src/base/str.cpp:629–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629static int hexval(char x)
630{
631 switch(x)
632 {
633 case '0': return 0;
634 case '1': return 1;
635 case '2': return 2;
636 case '3': return 3;
637 case '4': return 4;
638 case '5': return 5;
639 case '6': return 6;
640 case '7': return 7;
641 case '8': return 8;
642 case '9': return 9;
643 case 'a':
644 case 'A': return 10;
645 case 'b':
646 case 'B': return 11;
647 case 'c':
648 case 'C': return 12;
649 case 'd':
650 case 'D': return 13;
651 case 'e':
652 case 'E': return 14;
653 case 'f':
654 case 'F': return 15;
655 default: return -1;
656 }
657}
658
659static int byteval(const char *hex, unsigned char *dst)
660{

Callers 1

bytevalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected