Page 1 of 1

PostPosted: Sat Feb 26, 2005 6:42 pm
by trajecto
Is there a way with PocketC to search an input string for an exisiting string?

I believe it would be the strcmp function.

Thanks!
Chris

PostPosted: Sun Feb 27, 2005 2:35 am
by samps
Is this what you're looking for ?

strstr(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.


cheers
Samps

PostPosted: Sun Feb 27, 2005 2:31 pm
by trajecto
Thanks! That might just do it!