Is there a preprocessor function that returns the length of a string (constant)?
I have some code where I define a string using a macro:
#define LCDrespondsOK "LCD responds on I2C\r\nGood!"
and then I need to copy it to an I2C buffer in SRAM:
memcpy_P(&(i2cbuf), PSTR(LCDrespondsOK), strlen(LCDrespondsOK));
I'm not sure how strlen works in this case (it compiles fine, but can't really find the sequence in the list file). I would instead prefer a preprocessor function for getting the length of a string. Is there such a function?