How does strstr() work?

Jody Bruchon jody at jodybruchon.com
Sun Jan 4 15:04:42 UTC 2015


I was looking at the code for strstr(s1, s2) and I do not understand how 
it does what it's supposed to do. The only exit points return NULL or 
the original pointer to s1. How does strstr() return the pointer to the 
substring it's supposed to be looking for?


More information about the uClibc mailing list