MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / getAlphanumeric

Function getAlphanumeric

Libraries/QRCode/src/qrcode.c:104–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102
103
104static int8_t getAlphanumeric(char c) {
105
106 if (c >= '0' && c <= '9') { return (c - '0'); }
107 if (c >= 'A' && c <= 'Z') { return (c - 'A' + 10); }
108
109 switch (c) {
110 case ' ': return 36;
111 case '$': return 37;
112 case '%': return 38;
113 case '*': return 39;
114 case '+': return 40;
115 case '-': return 41;
116 case '.': return 42;
117 case '/': return 43;
118 case ':': return 44;
119 }
120
121 return -1;
122}
123
124static bool isAlphanumeric(const char *text, uint16_t length) {
125 while (length != 0) {

Callers 2

isAlphanumericFunction · 0.85
encodeDataCodewordsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected