MEMSTR - obtain first substring from string.
(Not in the ANSI standard)
Usage:
#include <sdgstd.h>
ptr = memstr( s, subs, size_s );
Where:
- const void *s;
- points to the string to be scanned.
- const char *subs;
- points to the (sub)string to scan for. This string should
end in the usual '\0'.
- size_t size_s;
- is the length of "s".
- void *ptr;
- points to the first occurrence of the substring in the
given string. If the substring is not found, this will be
a null pointer.
Description:
"memstr" returns a pointer to the first occurrence
of a substring within another string.
See Also:
expl c lib memmem
expl c lib memrstr
expl c lib strstr
Copyright © 1996, Thinkage Ltd.