Convert String string1 to char* - Arduino Forum - Index
void String::toCharArray(char *buf, unsigned int bufsize) { if (!bufsize || !buf) return; unsigned int len = bufsize - 1; if (len > _length) len = _length; strncpy(buf, _buffer, len); buf[len] = 0;} It just copies the internal buffer contents to the char ...