Simple question.
Example:
I want the string
"I like pie"
to become
"Ilikepie"
Is there a function for this?
I've tried google with no success.
Thanks in advance.
Simple question.
Example:
I want the string
"I like pie"
to become
"Ilikepie"
Is there a function for this?
I've tried google with no success.
Thanks in advance.
No, but it's easy to write.
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers
Here's a crappy function that i just wrote:
Code://The string must be NULL terminated void StripSpaces( char *buf ) { char *ptr = buf; int count = 0; //Loop till we find NULL while( *ptr ){ if( *ptr == ' ' ){ //Shift the string while( ptr[count] = ptr[count+1] ) count++; count = 0; } else{ //Move to the next character ptr++; } } }
Last edited by The Dog; 10-23-2003 at 06:10 AM.
I think I just solved it.
Thanks a lot anyway!