First off Brett, hit reply and change the to field.  ;)   you sent this
directly to me instead of the list   ;P

And yes, it would change it to &-ode instead of &-code.   My mistake. As I
mentioned earlier.  It's been a rough day today.

Rheede

----- Original Message -----
From: "Brett Phipps" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 17, 2003 12:37 PM
Subject: Re: String Manipulation


>
> *Spams the list even more*
>
> He mentions this being for a color code conversion primarily I believe.
> So if we had a string that was... "Brett can't ~code"
>
> Would the below suggestion turn the string into "Brett can't &-ode"?
> I'm probably missing something here, so I appoligize for the spam
> my denseness is causing ;)
>
> > > 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
>
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail


Reply via email to