I'm not a C programmer for a long time (more than 8 years) and I don't know much more about the strings functions that we have today aside the basic ones...
I want to do some search/calculate/replace in a string but I don't know the functions well aside do in the hard code way, char by char... which I think should exist a better way to solve...
here's what I need:
I have a big string, and inside we have N times like this code:
"origin" "-264 -256 16"
the numbers aren't the same of course, and I need to replace all these origins in Z axis plus 15... (in this case, I need to add 15 to the 16 value)
so I need to turn that string into:
"origin" "-264 -256 31"
it's not always 2 chars, could be even like:
"origin" "-264 -256 1234"
but in all the cases is just add 15 to the Z axis to fix a bug.
so we need to get the number between the third space and third " after the string origin, convert to number, add 15, and replace in the string.
this must be done to all origins found on the string.
thanks a lot!