Hi,

Michal Mazurek wrote on Wed, May 11, 2016 at 10:41:03AM +0200:

> * add explicit RETURN VALUES section
> * add an EXAMPLES section, from NetBSD and FreeBSD
> * mention memmem(3)

Committed without the EXAMPLES.  I agree with tedu@ that this
example is trivial and doesn't add value.

Thanks,
  Ingo


> Index: lib/libc/string/strstr.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/string/strstr.3,v
> retrieving revision 1.12
> diff -u -p -r1.12 strstr.3
> --- lib/libc/string/strstr.3  5 Jun 2013 03:39:23 -0000       1.12
> +++ lib/libc/string/strstr.3  11 May 2016 08:35:56 -0000
> @@ -56,7 +56,7 @@ The
>  function is similar to
>  .Fn strstr
>  but ignores the case of both strings.
> -.Pp
> +.Sh RETURN VALUES
>  If
>  .Fa little
>  is an empty string,
> @@ -71,8 +71,23 @@ is returned;
>  otherwise a pointer to the first character of the first occurrence of
>  .Fa little
>  is returned.
> +.Sh EXAMPLES
> +The following sets the pointer
> +.Va ptr
> +to the
> +.Qq Li Bar Baz
> +portion of
> +.Va largestring :
> +.Bd -literal -offset indent
> +const char *largestring = "Foo Bar Baz";
> +const char *smallstring = "Bar";
> +char *ptr;
> +
> +ptr = strstr(largestring, smallstring);
> +.Ed
>  .Sh SEE ALSO
>  .Xr memchr 3 ,
> +.Xr memmem 3 ,
>  .Xr strchr 3 ,
>  .Xr strcspn 3 ,
>  .Xr strpbrk 3 ,

Reply via email to