1*0f7b5e2fSjmc.\" $OpenBSD: strcmp.9,v 1.2 2018/04/23 11:11:38 jmc Exp $ 2175775bbSdlg.\" 3175775bbSdlg.\" Copyright (c) 2002, 2003 CubeSoft Communications, Inc. 4175775bbSdlg.\" <http://www.csoft.org> 5175775bbSdlg.\" 6175775bbSdlg.\" Redistribution and use in source and binary forms, with or without 7175775bbSdlg.\" modification, are permitted provided that the following conditions 8175775bbSdlg.\" are met: 9175775bbSdlg.\" 1. Redistributions of source code must retain the above copyright 10175775bbSdlg.\" notice, this list of conditions and the following disclaimer. 11175775bbSdlg.\" 2. Redistributions in binary form must reproduce the above copyright 12175775bbSdlg.\" notice, this list of conditions and the following disclaimer in the 13175775bbSdlg.\" documentation and/or other materials provided with the distribution. 14175775bbSdlg.\" 15175775bbSdlg.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16175775bbSdlg.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17175775bbSdlg.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18175775bbSdlg.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 19175775bbSdlg.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20175775bbSdlg.\" (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21175775bbSdlg.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22175775bbSdlg.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 23175775bbSdlg.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 24175775bbSdlg.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE 25175775bbSdlg.\" POSSIBILITY OF SUCH DAMAGE. 26175775bbSdlg.\" 27175775bbSdlg.Dd $Mdocdate: April 23 2018 $ 28175775bbSdlg.Dt STRCMP 9 29175775bbSdlg.Os 30175775bbSdlg.Sh NAME 31175775bbSdlg.Nm strlen , 32175775bbSdlg.Nm strnlen , 33175775bbSdlg.Nm strncpy , 34175775bbSdlg.Nm strlcpy , 35175775bbSdlg.Nm strlcat , 36175775bbSdlg.Nm strcmp , 37175775bbSdlg.Nm strncmp , 38175775bbSdlg.Nm strncasecmp 39175775bbSdlg.Nd kernel library string routines 40175775bbSdlg.Sh SYNOPSIS 41175775bbSdlg.In lib/libkern/libkern.h 42175775bbSdlg.Ft size_t 43175775bbSdlg.Fn strlen "const char *s" 44175775bbSdlg.Ft size_t 45175775bbSdlg.Fn strnlen "const char *s" "size_t maxlen" 46175775bbSdlg.Ft char * 47175775bbSdlg.Fn strncpy "char *dst" "const char *src" "size_t len" 48175775bbSdlg.Ft size_t 49175775bbSdlg.Fn strlcpy "char *dst" "const char *src" "size_t size" 50175775bbSdlg.Ft size_t 51175775bbSdlg.Fn strlcat "char *dst" "const char *src" "size_t size" 52175775bbSdlg.Ft int 53175775bbSdlg.Fn strcmp "const char *s1" "const char *s2" 54175775bbSdlg.Ft int 55175775bbSdlg.Fn strncmp "const char *s1" "const char *s2" "size_t len" 56175775bbSdlg.Ft int 57175775bbSdlg.Fn strncasecmp "const char *s1" "const char *s2" "size_tlen" 58175775bbSdlg.Sh DESCRIPTION 59*0f7b5e2fSjmcThese functions have the same semantics as their libc counterparts, 60175775bbSdlg.Xr strlen 3 , 61175775bbSdlg.Xr strncpy 3 , 62175775bbSdlg.Xr strnlen 3 , 63175775bbSdlg.Xr strlcpy 3 , 64175775bbSdlg.Xr strlcat 3 , 65175775bbSdlg.Xr strcmp 3 , 66175775bbSdlg.Xr strncmp 3 67175775bbSdlgand 68175775bbSdlg.Xr strncasecmp 3 . 69175775bbSdlg.Sh SEE ALSO 70175775bbSdlg.Xr strcmp 3 , 71175775bbSdlg.Xr strlcat 3 , 72175775bbSdlg.Xr strlcpy 3 , 73175775bbSdlg.Xr strlen 3 , 74175775bbSdlg.Xr strncmp 3 , 75175775bbSdlg.Xr strncpy 3 , 76175775bbSdlg.Xr strnlen 3 77175775bbSdlg.Sh STANDARDS 78175775bbSdlgThe 79175775bbSdlg.Fn strlen , 80175775bbSdlg.Fn strncpy , 81175775bbSdlg.Fn strcmp , 82175775bbSdlg.Fn strncmp 83175775bbSdlgand 84175775bbSdlg.Fn strcasecmp 85175775bbSdlgfunctions conform to 86175775bbSdlg.St -ansiC . 87