I use the following function as my easily adaptable, portable strtok():
char *skip( register char *p, register c)
{
while(*p && (*p != c) && ('\n' != *p))
++p;
if(*p)
*p++ = 0;
return(p);
}
Here's an example of it's use:
struct rec *parse()
{
...
r.date = p = &line[0];
r.time = p = skip(p, '@');
r.who = p = skip(p,'.');
...
return(&r);
}
Dave Lippincott wrote:
> Will StrStr do? Details are in the Programmer's Reference.
>
> How to convert an int to float:
> int a;
> float b;
>
> b = a;
> or
> b = (float)a; // if the compiler complains
>
> ----- Original Message -----
> From: "Rania Saymeh" <[EMAIL PROTECTED]>
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Friday, October 19, 2001 7:52 AM
> Subject: strtok?
>
> > Hi,
> >
> > I was wondering if the String Manager functions for Palm OS have anything
> > equivelant to strtok? also is there a way to switch ints to floats?
> >
> > thanx!
> >
> >
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
> >
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/