strstr.c

The libc implementation

Author

Martin ‘Solar’ Baute

License

Public Domain

Summary
strstr.cThe libc implementation
Functions
strstrFinds the first occurance of s1 in s2

Functions

strstr

char * strstr(const char *s1,
const char *s2)

Finds the first occurance of s1 in s2

Returns a pointer to the location where s1 is contained in s2

Returns NULL if s1 could not be found inside s2

char * strstr(const char *s1,
const char *s2)
Finds the first occurance of s1 in s2