What would be the best way in C to search through a char* and replace all occurances of a character with a substring. For example, I need to backslash (\) out some characters in a char* that could screw with execution. How would I replace all occurances of ' with \' - Example:
Orignal char*:
"cat's are joe's favorite animal";
New char*:
"cat\'s are joe\'s favorite animal";
Thanks,
-bitwise
Orignal char*:
"cat's are joe's favorite animal";
New char*:
"cat\'s are joe\'s favorite animal";
Thanks,
-bitwise