size_t strlen_P

size_t strlen_P(const char *s)

The strlen_P() function is similar to strlen(), except that src is a pointer to a string in program space.


The strlen_P() function returns the number of characters in src.


strlen_P() is implemented as an inline function in the avr/pgmspace.h header file, which will check if the length of the string is a constant and known at compile time. If it is not known at compile time, the macro will issue a call to __strlen_P() which will then calculate the length of the string as normal.