Strings In Depth7 / 18
Up next

strchr

#include <stdio.h>
#include <string.h>

int main(void) {
    const char *s = "a,b,c";
    const char *p = strchr(s, ',');
    if (p != nullptr) {
        printf("comma at index %td\n", p - s);
    }
    return 0;
}
What you're solving

find the first byte, or NULL