1*48351Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California. 241964Sbostic.\" All rights reserved. 341964Sbostic.\" 441964Sbostic.\" This code is derived from software contributed to Berkeley by 541964Sbostic.\" Chris Torek. 641964Sbostic.\" %sccs.include.redist.man% 741964Sbostic.\" 8*48351Scael.\" @(#)strcasecmp.3 5.4 (Berkeley) 04/19/91 941964Sbostic.\" 10*48351Scael.Dd 11*48351Scael.Dt STRCASECMP 3 12*48351Scael.Os 13*48351Scael.Sh NAME 14*48351Scael.Nm strcasecmp 15*48351Scael.Nd compare strings, ignoring case 16*48351Scael.Sh SYNOPSIS 17*48351Scael.Fd #include <string.h> 18*48351Scael.Ft int 19*48351Scael.Fn strcasecmp "const char *s1" "const char *s2" 20*48351Scael.Ft int 21*48351Scael.Fn strncasecmp "const char *s1" "const char *s2" "size_t len" 22*48351Scael.Sh DESCRIPTION 23*48351ScaelThe 24*48351Scael.Fn strcasecmp 2543629Sbosticand 26*48351Scael.Fn strncasecmp 27*48351Scaelfunctions 2843629Sbosticcompare the null-terminated strings 29*48351Scael.Fa s1 3041964Sbosticand 31*48351Scael.Fa s2 3243629Sbosticand return an integer greater than, equal to, or less than 0, 3341964Sbosticaccording as 34*48351Scael.Fa s1 3541964Sbosticis lexicographically greater than, equal to, or less than 36*48351Scael.Fa s2 3741964Sbosticafter translation of each corresponding character to lower-case. 3841964SbosticThe strings themselves are not modified. 39*48351ScaelThe comparison is done using unsigned characters, so that 40*48351Scael.Sq Li \e200 41*48351Scaelis greater than 42*48351Scael.Ql \e0 . 43*48351Scael.Pp 44*48351ScaelThe 45*48351Scael.Fn strncasecmp 4643629Sbosticcompares at most 47*48351Scael.Fa len 4843629Sbosticcharacters. 49*48351Scael.Sh SEE ALSO 50*48351Scael.Xr bcmp 3 , 51*48351Scael.Xr memcmp 3 , 52*48351Scael.Xr strcmp 3 , 53*48351Scael.Xr strcoll 3 , 54*48351Scael.Xr strxfrm 3 55*48351Scael.Sh HISTORY 56*48351ScaelThe 57*48351Scael.Fn strcasecmp 58*48351Scaeland 59*48351Scael.Fn strncasecmp 60*48351Scaelfunctions are 61*48351Scael.Ud . 62