I tried using strncmp but it only works if I give it a specific number of bytes I want to extract.
char line[256] = This \"is\" an example. //I want to extr
#include ... substring[0] = '\0'; const char *start = strchr(line, '"') + 1; strncat(substring, start, strcspn(start, "\""));
Bounds and error checking omitted. Avoid strtok because it has side effects.
strtok