Add man page entry for strnstr.c.

This commit is contained in:
Sichen Zhao 2017-08-30 11:03:57 +08:00 committed by Corinna Vinschen
parent f22054c94d
commit 42885ea4b8
2 changed files with 43 additions and 0 deletions

View File

@ -40,6 +40,7 @@ managing areas of memory. The corresponding declarations are in
* strncat:: Concatenate strings
* strncmp:: Character string compare
* strncpy:: Counted copy string
* strnstr:: Find string segment
* strnlen:: Character string length
* strpbrk:: Find chars in string
* strrchr:: Reverse search for character in string
@ -158,6 +159,9 @@ managing areas of memory. The corresponding declarations are in
@page
@include string/strncpy.def
@page
@include string/strnstr.def
@page
@include string/strnlen.def

View File

@ -1,3 +1,42 @@
/*
FUNCTION
<<strnstr>>---find string segment
INDEX
strnstr
ANSI_SYNOPSIS
#include <string.h>
size_t strnstr(const char *<[s1]>, const char *<[s2]>, size_t <[n]>);
TRAD_SYNOPSIS
#include <string.h>
size_t strnstr(<[s1]>, <[s2]>, <[n]>)
char *<[s1]>;
char *<[s2]>;
size_t <[n]>;
DESCRIPTION
Locates the first occurrence in the string pointed to by <[s1]> of
the sequence of limited to the <[n]> characters in the string
pointed to by <[s2]>
RETURNS
Returns a pointer to the located string segment, or a null
pointer if the string <[s2]> is not found. If <[s2]> points to
a string with zero length, <[s1]> is returned.
PORTABILITY
<<strnstr>> is ANSI C.
<<strnstr>> requires no supporting OS subroutines.
QUICKREF
strnstr ansi pure
*/
#undef __STRICT_ANSI__
#include <_ansi.h>
#include <string.h>