diff options
author | DJ Delorie <dj@delorie.com> | 2001-09-26 18:45:50 +0000 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2001-09-26 18:45:50 +0000 |
commit | bd7ce1bbb2ea47e045e6dd755cf16f05a2555309 (patch) | |
tree | 9fcc8e3e643152ed109636c5420b217c9d116002 /libiberty/strstr.c | |
parent | 3d6b05970e5c5b951cf734883641e64090a3c370 (diff) | |
download | gdb-bd7ce1bbb2ea47e045e6dd755cf16f05a2555309.tar.gz |
merge from gcc
Diffstat (limited to 'libiberty/strstr.c')
-rw-r--r-- | libiberty/strstr.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/libiberty/strstr.c b/libiberty/strstr.c index fab36e3fb3d..e7360341bc0 100644 --- a/libiberty/strstr.c +++ b/libiberty/strstr.c @@ -3,24 +3,16 @@ /* -NAME +@deftypefn Supplemental char* strstr (const char *@var{string}, const char *@var{sub}) - strstr -- locate first occurance of a substring +This function searches for the substring @var{sub} in the string +@var{string}, not including the terminating NUL characters. A pointer +to the first occurance of @var{sub} is returned, or NULL if the +substring is absent. If @var{sub} points to a string with zero +length, the function returns @var{string}. -SYNOPSIS +@end deftypefn - #include <string.h> - - char *strstr (char *s1, char *s2) - -DESCRIPTION - - Locates the first occurance in the string pointed to by S1 of - the string pointed to by S2. Returns a pointer to the substring - found, or a NULL pointer if not found. If S2 points to a string - with zero length, the function returns S1. - -BUGS */ |