I am using Arduino. I would like to append a String object to an array of characters.
String msg = "ddeeff"
//assume charArr already contains some string
//How can I do something like this to append String to charArray?
charArr = charArr + msg;
This will work for Arduino String object.
strcat( charArr, msg.c_str() );
msg gets converted into an array of characters with the String method c_str(). Then, you can use strcat() to append the 2 arrays of characters.
As mentioned by Rakete1111, it is undefined behavior if
charArr is not big enough