if i have a string of unkown length.
like: ".....name Bloor Danforth , stops 32, kilometers 26.3...."
I have to get rid of spaces before and after the coma ' , '.
The contents of the string are unknown.
if i have a string of unkown length.
like: ".....name Bloor Danforth , stops 32, kilometers 26.3...."
I have to get rid of spaces before and after the coma ' , '.
The contents of the string are unknown.
Since you can't remove arbitrary array elements, you need move everything past the element you want to erase. memmove() is good for doing this.
bit∙hub [bit-huhb] n. A source and destination for information.
Well, as a good starting point look in your C library documentation and see if there's anything that will locate one character in a string (hint: yes there is) then figure out how that might be used to mark the string for other functions like memmove() etc.
The operative skill here is "looking stuff up"...
lol true but the string has unknown number of columns and i have to get rid of the space before and after the columns (only if the space exists)