I have this:
char* original = \"html content\";
And want to insert a new
char* mycontent = \"newhtmlinsert\";
You need to use strcat() for this problem.
Example =
/* strcat example */
#include
#include
int main ()
{
char str[80];
strcpy (str,"these ");
strcat (str,"strings ");
strcat (str,"are ");
strcat (str,"concatenated.");
puts (str);
return 0;
}
Though you need to check the bounds so you can use the bounds variant of strncat().
#include
char *strncat(char *restrict s1, const char *restrict s2, size_t n);
Make sure whatever buffer you are appending your string into has enough space to not cause a buffer overflow.