1.\" $NetBSD: strings.3,v 1.3 2017/06/17 10:48:09 abhinav Exp $ 2.\" 3.\" Copyright (c) 2007 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Thomas Klausner. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd June 17, 2017 31.Dt STRINGS 3 32.Os 33.Sh NAME 34.Nm strings 35.Nd string operations 36.Sh LIBRARY 37.Lb libc 38.Sh SYNOPSIS 39.In strings.h 40.Ft int 41.Fn bcmp "const void *b1" "const void *b2" "size_t len" 42.Ft void 43.Fn bcopy "const void *src" "void *dst" "size_t len" 44.Ft void 45.Fn bzero "void *b" "size_t len" 46.Ft int 47.Fn ffs "int value" 48.Ft char * 49.Fn index "const char *s" "int c" 50.Ft char * 51.Fn rindex "const char *s" "int c" 52.Ft int 53.Fn strcasecmp "const char *s1" "const char *s2" 54.Ft int 55.Fn strncasecmp "const char *s1" "const char *s2" "size_t len" 56.Sh DESCRIPTION 57These functions all live in the 58.In strings.h 59header file. 60Except for 61.Fn ffs , 62they operate on strings. 63.Fn index , 64.Fn rindex , 65and 66.Fn strcasecmp 67need nul-terminated strings. 68.Pp 69See the specific manual pages for more information. 70.Pp 71See 72.Xr string 3 73for string functions that follow 74.St -ansiC 75or 76.St -isoC-99 , 77.Xr bstring 3 78for functions that operate on strings that are not nul-terminated, and 79.Xr bitstring 3 80for bit-string manipulation macros. 81.Sh SEE ALSO 82.Xr bcmp 3 , 83.Xr bcopy 3 , 84.Xr bitstring 3 , 85.Xr bstring 3 , 86.Xr bzero 3 , 87.Xr ffs 3 , 88.Xr index 3 , 89.Xr rindex 3 , 90.Xr strcasecmp 3 , 91.Xr string 3 92