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.


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.


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