P
pete
And the way I wrote memcmp() above, it doesn't.
I have a toy string library, as I suspect you do,
but I only use function calls in my function definitions
in cases where the real library functions would also do the trick.
My main goals are
1 trying to get the definitions correct
2 showing any relationships that may exist between
what various standard library functions do.
If you rewrite the above strstr function definition
with strncmp instead of memcmp,
then you are showing a relationship that really exists between
what the standard library functions strstr and strncmp do.
I don't think there's any real value
in showing that what strstr does,
can be described by your specific implementation of memcmp.