Page 1 of 1

PostPosted: Thu Apr 22, 2004 12:58 pm
by samourai37
in C we can use a function : strstr(const char *string1, const char string2);

This function return the string2 value index in the string1.

example : strstr("we are the champion","are");
/* return the value index of 'are'*/ 4 here

How many to make that with pocketC ????

PostPosted: Thu Apr 22, 2004 3:08 pm
by Mikael
Is this what you mean?

<b>strstr</b>(string str, string sub, int first) - searches str for a substring sub starting at the character first. Returns the starting position of sub within str or -1 on failure.


PostPosted: Fri Apr 23, 2004 8:17 am
by samourai37
Yes Mickael but this function is not implanted in my pocketC
version 3.01.

Exist there a complementary lib or a algo which would make it possible to make the same thing ?????]

PostPosted: Fri Apr 23, 2004 11:46 am
by Mikael
I'm currently using version 6.1.0 and not 6.5.0 due to some problems which are well known with the latest version, when it comes to strings.

All I can suggest, is that you download the latest version. At the time I bought PocketC (about a year and a half ago) I received an e-mail with a link to the Orbworks site which enables you to receive free updates. I'm not sure if this was the case when 3.1.0 was released though. If not, perhaps try buying the new version.