MCPcopy Create free account
hub / github.com/FastLED/FastLED / charToDigit

Function charToDigit

src/fl/stl/cstdlib.cpp.hpp:72–83  ·  view source on GitHub ↗

Helper function to convert character to digit value

Source from the content-addressed store, hash-verified

70
71// Helper function to convert character to digit value
72static int charToDigit(char c) {
73 if (c >= '0' && c <= '9') {
74 return c - '0';
75 }
76 if (c >= 'a' && c <= 'z') {
77 return c - 'a' + 10;
78 }
79 if (c >= 'A' && c <= 'Z') {
80 return c - 'A' + 10;
81 }
82 return 0;
83}
84
85long strtol(const char* str, char** endptr, int base) {
86 if (!str) {

Callers 2

strtolFunction · 0.85
strtoulFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected