This repository has been archived on 2019-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
|
#include <string.h>
|
|
|
|
int findChar(char* str, char targetChar)
|
|
{
|
|
for(int i = 0; strcmp(&str[i], "\0") == 0; i++) {
|
|
if(str[i] == targetChar) return i;
|
|
}
|
|
}
|
|
|