flag fields are u_int's
[unix-history] / usr / src / lib / libc / string / strncasecmp.3
CommitLineData
f66f3553
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.\"
9.\" @(#)strncasecmp.3 5.1 (Berkeley) %G%
10.\"
11.TH STRCASECMP 3 ""
12.UC 7
13.SH NAME
14strncasecmp \- 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);
22
23int
24strncasecmp(const char *s1, const char *s2, size_t len);
25.ft R
26.fi
27.SH DESCRIPTION
28.B Strcasecmp
29compares null-terminated strings
30.I s1
31and
32.I s2
33and returns an integer greater than, equal to, or less than 0,
34according as
35.I s1
36is lexicographically greater than, equal to, or less than
37.IR s2
38after translation of each corresponding character to lower-case.
39The strings themselves are not modified.
40The comparison is done using unsigned characters, so that '\e200'
41is greater than '\e0'.
42.PP
43.B Strncasecmp
44compares at most
45.I len
46characters.
47.SH SEE ALSO
48bcmp(3), memcmp(3), strcasecmp(3), strcmp(3), strcoll(3)
49strncmp(3), strxfrm(3)