This is my first time posting and I am not a strong C programmer so here is my problem.
I am interfacing with a 3rd party software and the return from this app would be a space (or so I believe it is space) delimited string. I am having trouble replacing the "space" with a user defined delimiter.
example -
output string from 3rd party app:
What I would like to do is to convert the spaces between each to whatever the user has defined so it may look like -Code:name1 name2 name3
I am using following code and it does not seem to work - special characters are being inserted into the string when I do the following -Code:name1,name2,name3
Any ideasCode:for(i=0; i<strlen(buffer); i++) { if (buffer[i]==' ' && buffer[i-1] != ',') { tbuf[i]=','; } else tbuf[i]=buffer[i]; }