Problems !!

Hey, i would like to compare two strings and match it up like this.

First string = popo
Second String = Hi there

It will become like this.
Hi there
po popop.

it like skipping the space and go to the next one. Help anyone?
Could you describe algorithm in greater detail?
Last edited on
I think mrgoogle wants something like this:
1
2
3
4
5
6
7
8
for(int f=0,s=0; f<first.length(); f++, s++)
{
     if (s>=second.length()) s=0;
     if (first[f]==' ')
     {     s=-1;
           third+=' ';
     }else third+=second[s];
}
Topic archived. No new replies allowed.