How to concat two strings without overwriting any of them?
Posted: Wed Nov 18, 2015 2:25 am
Hey guys,
I am trying to create MQTT subscription strings, to which ESP module should subscribe. I have tried using strcat, but it replaces the original string.
I want the string to include the ESP8226 chip id in the subscribe string.
Ex: "ESP_182648/gpio/0".
But it overwrites the source string "ESP+182648" when I use strcat.
Any solution?
I am trying to create MQTT subscription strings, to which ESP module should subscribe. I have tried using strcat, but it replaces the original string.
I want the string to include the ESP8226 chip id in the subscribe string.
Ex: "ESP_182648/gpio/0".
But it overwrites the source string "ESP+182648" when I use strcat.
Any solution?