/* Writes a "UTF" string to an output buffer. Converts C string to length-delimited.  */
void mqtt_write_cstr(unsigned char **pptr, const char *string)
/* Writes a "UTF" string to an output buffer. Converts C string to length-delimited.  */
void mqtt_write_cstr(unsigned char **pptr, const char *string)
{
	int len = strlen(string);
	mqtt_write_int(pptr, len);
	memcpy(*pptr, string, len);
	*pptr += len;
}