1*62925Sbostic.\" Copyright (c) 1990, 1991, 1993 2*62925Sbostic.\" The Regents of the University of California. 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*62925Sbostic.\" @(#)strcasecmp.3 8.1 (Berkeley) 06/09/93 941964Sbostic.\" 1048351Scael.Dd 1148351Scael.Dt STRCASECMP 3 1248351Scael.Os 1348351Scael.Sh NAME 1448351Scael.Nm strcasecmp 1548351Scael.Nd compare strings, ignoring case 1648351Scael.Sh SYNOPSIS 1748351Scael.Fd #include <string.h> 1848351Scael.Ft int 1948351Scael.Fn strcasecmp "const char *s1" "const char *s2" 2048351Scael.Ft int 2148351Scael.Fn strncasecmp "const char *s1" "const char *s2" "size_t len" 2248351Scael.Sh DESCRIPTION 2348351ScaelThe 2448351Scael.Fn strcasecmp 2543629Sbosticand 2648351Scael.Fn strncasecmp 2748351Scaelfunctions 2843629Sbosticcompare the null-terminated strings 2948351Scael.Fa s1 3041964Sbosticand 3148351Scael.Fa s2 3243629Sbosticand return an integer greater than, equal to, or less than 0, 3341964Sbosticaccording as 3448351Scael.Fa s1 3541964Sbosticis lexicographically greater than, equal to, or less than 3648351Scael.Fa s2 3741964Sbosticafter translation of each corresponding character to lower-case. 3841964SbosticThe strings themselves are not modified. 3948351ScaelThe comparison is done using unsigned characters, so that 4048351Scael.Sq Li \e200 4148351Scaelis greater than 4248351Scael.Ql \e0 . 4348351Scael.Pp 4448351ScaelThe 4548351Scael.Fn strncasecmp 4643629Sbosticcompares at most 4748351Scael.Fa len 4843629Sbosticcharacters. 4948351Scael.Sh SEE ALSO 5048351Scael.Xr bcmp 3 , 5148351Scael.Xr memcmp 3 , 5248351Scael.Xr strcmp 3 , 5348351Scael.Xr strcoll 3 , 5448351Scael.Xr strxfrm 3 5548351Scael.Sh HISTORY 5648351ScaelThe 5748351Scael.Fn strcasecmp 5848351Scaeland 5948351Scael.Fn strncasecmp 6062924Sbosticfunctions first appeared in 4.4BSD. 61