Skip to content

Instantly share code, notes, and snippets.

@namrog84
Forked from anonymous/charcompare.h
Last active September 2, 2015 02:56
Show Gist options
  • Save namrog84/704e0e82cd07eeca028c to your computer and use it in GitHub Desktop.
Save namrog84/704e0e82cd07eeca028c to your computer and use it in GitHub Desktop.
bool ContainsChar(char c, const char * str)
{
char * ptr = str;
while(ptr != null)
{
if(*ptr == c)
{
return true;
}
ptr++;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment