Make all bucket and overflow addresses unsigned
[unix-history] / usr / src / lib / libc / string / strcasecmp.3
CommitLineData
7be52b56
KB
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek.
6.\"
7.\" %sccs.include.redist.man%
8.\"
b8dfab23 9.\" @(#)strcasecmp.3 5.2 (Berkeley) %G%
7be52b56
KB
10.\"
11.TH STRCASECMP 3 ""
12.UC 7
13.SH NAME
14strcasecmp \- compare strings, ignoring case
15.SH SYNOPSIS
16.nf
17.ft B
18#include <string.h>
19
20int
21strcasecmp(const char *s1, const char *s2);
b8dfab23
KB
22
23int
24strncasecmp(const char *s1, const char *s2, size_t len);
7be52b56
KB
25.ft R
26.fi
27.SH DESCRIPTION
28.B Strcasecmp
b8dfab23
KB
29and
30.B strncasecmp
31compare the null-terminated strings
7be52b56
KB
32.I s1
33and
34.I s2
b8dfab23 35and return an integer greater than, equal to, or less than 0,
7be52b56
KB
36according as
37.I s1
38is lexicographically greater than, equal to, or less than
39.IR s2
40after translation of each corresponding character to lower-case.
41The strings themselves are not modified.
42The comparison is done using unsigned characters, so that '\e200'
43is greater than '\e0'.
b8dfab23
KB
44.PP
45.B Strncasecmp
46compares at most
47.I len
48characters.
7be52b56 49.SH SEE ALSO
b8dfab23 50bcmp(3), memcmp(3), strcmp(3), strcoll(3), strxfrm(3)