> I would like to change the following function to replace the tilde letter
to
> the two letters "&-" which is my color code for the tilde letter. Right
now
> it can only replace the letter with another letter. What what I do to this
> function to be able to replace the tilde letter with two letters? I'm new
to
> string manipulation. =P
>
> void smash_tilde( const char *str )
> {
>     for ( ; *str != '\0'; str++ )
>     {
>         if (*str == '~')
>         *(char *) str = '&';
           *(char *) ++str = '-';   <----Basically you move forward down the
string
                                                      and add the extra
character. No too hard.  :)
>     }
>  return;
> }

Happy coding,
Rheede


Reply via email to