Re: next weekend...

From: Guido Serassio <guido.serassio@dont-contact.us>
Date: Wed, 26 Apr 2006 19:18:35 +0200

Hi Henrik,

At 11.49 26/04/2006, Henrik Nordstrom wrote:
> >
> > Cool. Can I just use it then [are you happy to make the compatability
> > library ?]
>
>Here is one suggestion:
>
>
>#include <string.h>
>
>char *strtok_r(char *str, const char *delim, char **saveptr)
>{
> char *token;
> if (str)
> *saveptr = str;
> token = *saveptr;
>
> if (!token)
> return NULL;
>
> token += strspn(token, delim);
> *saveptr = strpbrk(token, delim);
> if (*saveptr)
> *(*saveptr)++ = '\0';
>
> return *token ? token : NULL;
>}

Or what about this one ?

http://www.koders.com/c/fid3F7CD99A2330F1C4597E40E95EC1F2ABF7D3585C.aspx?s=strtok_r
http://www.koders.com/c/fidB5BB2AC1E8C46149D409AEE6639912F088F6DF3D.aspx?s=strtok_r

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Wed Apr 26 2006 - 11:18:42 MDT

This archive was generated by hypermail pre-2.1.9 : Mon May 01 2006 - 12:00:03 MDT