#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; }
find the first byte, or NULL