Searching a String
Posted on 2007-04-02
Just been playing around with a few string searches.
I have just done:
int String_CountSeperators(const char *pString, int c)
int count = 0;
if(*pString == (char)c)
The idea is that the user would pass in a string (*pString) and then an int (c) which is the location in that string of the first seperator. It will then search the string and count how many seperators I have, returning the count.
Does it look right? anything I could do to improve it?