Thank you Matt.
If you don't mind I ask, what does this statement do?
short_str[j] = 0;
Also, would the following initialize short_str to an
empty string?
Char * short_str;
short_str[0] = '\0';
Thanks.
--- Matt Graham <[EMAIL PROTECTED]> wrote:
> christy wrote:
> > My string (long_str) is delimited by "~". I need
> to
> > chop off by ~ point and output multiple short_str
> to
> > the screen:
> >
> > I am looping the long_str and look for "~":
> >
>
> try this (or something like it):
>
> int i,j;
> i = 0;
> while ( long_str[i] ) {
> j = 0;
> while ( long_str[i] && long_str[i] != '~' ) {
> short_str[j++] = long_str[i++];
> }
> short_str[j] = 0;
> i++;
> WinDrawChars( short_str, .... )
> }
>
> matt
>
>
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/