I was tinkering with memrchr() and noticed it is not represented by a theme color, like the way memchr() is.
Is this just an oversight? Can it be made to display a theme color?
// Find a character by searching backwards through a string
// uses memrchr()
char data[] = "/set color #FF5480";
char* numStart;
unsigned long numFound;
void setup() {
Serial.begin(115200);
Serial.print("input characters - ");
Serial.println(data);
numStart = (char*)memrchr(data, '#', strlen(data)); // find number marker by searching backwards
numStart += 1; // move past marker character to point to first hex character
Serial.print("-------------------\nas text - ");
Serial.println(numStart);
numFound = strtoul(numStart, NULL, HEX);
Serial.print("as number - ");
Serial.println(numFound);
}
void loop() {
// empty
}
The global keywords are defined in {Arduino IDE installation folder}/lib/keywords.txt
You can add it in your local installation, or if you want to try to get it done upstream, submit a pull request on GitHub:
It probably would be best to do a comprehensive review of the keywords and propose to add all missing ones at once, rather than a PR for a single keyword. I had luck adding a bunch of missing math keywords a while back:
so the developers aren't completely closed to the idea of adding more
pert:
You can add it in your local installation, or if you want to try to get it done upstream, submit a pull request on GitHub:
Thank you. I lean toward the pull request because then I won't have to fiddle with the install every time there's an update. Guess I'll have to learn how to use github. Sigh.