string parsing occurrence in c
- by Dan74
I have a string as const char *str = "Hello, this is an example of my string";
How could I get everything after the first comma. So for this instance: this is an example of my string
I was planing to do something like:
// pseudocode
char *a, *b;
loop {
if((a = strchr(l, ',')) == NULL) break;
b++;
// but not sure here
}
printf("%s",a);
Thanks