SyntaxFix
Write A Post
Hire A Developer
Questions
strchr for searching a char from start (strrchr from the end):
char str[] = "This is a sample string"; if (strchr(str, 'h') != NULL) { /* h is in str */ }