I\'m trying to figure out how to cut part of a string in C. For example you have this character string \"The dog died because a car hit him while it was crossing the road\" how
strstr would be perfect for you, if you know the contents of the string.
strstr
Example:
char *str = "A dog died because a car hit him while he was crossing the road."; char *pCh = strstr(str, "dog");
pCh will have the address of the 'd' in "dog".
pCh
'd'
"dog"