Debian Codegraph @

man/man3/fstrcoll.3

raw
1 .\"
2 .\" fstrcmp - fuzzy string compare library
3 .\" Copyright (C) 2009, 2011 Peter Miller
4 .\" Written by Peter Miller <[email protected]>
5 .\"
6 .\" This program is free software; you can redistribute it and/or modify
7 .\" it under the terms of the GNU General Public License as published by
8 .\" the Free Software Foundation; either version 3 of the License, or
9 .\" (at your option) any later version.
10 .\"
11 .\" This program is distributed in the hope that it will be useful,
12 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 .\" General Public License for more details.
15 .\"
16 .\" You should have received a copy of the GNU General Public License
17 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
18 .\"
19 .ds n) fstrcoll
20 .TH fstrcoll 3
21 .SH NAME
22 fstrcoll \- fuzzy comparison of two strings using the current locale
23 .if require_index \{
24 .XX "fstrcoll(3)" "fuzzy comparison of two strings using the current locale"
25 .\}
26 .SH SYNOPSIS
27 #include <fstrcmp.h>
28 .sp 0.3
29 #define FSTRCMP_IDENTICAL
30 .br
31 #define FSTRCMP_THRESHOLD
32 .br
33 #define FSTRCMP_ERROR
34 .sp 0.3
35 double fstrcoll(const char *string1, const char *string2);
36 .SH DESCRIPTION
37 The \f[B]strcoll\fP() function compares the two strings
38 \f[I]sting1\fP and \f[I]string2\fP.
39 The comparison is based on strings interpreted as appropriate for the
40 program's current locale for category LC_CTYPE.
41 .SH RETURN VALUE
42 The \f[B]fstrcoll\fP function returns a floating point value between
43 0.0 and FSTRCMP_IDENTICAL. A value of 0.0 means the strings are
44 utterly un-alike. A value of FSTRCMP_IDENTICAL means the strings are
45 identical. A value of more than FSTRCMP_THRESHOLD (it lies between 0.0
46 and FSTRCMP_IDENTICAL) would be considered "similar" by most people.
47 .PP
48 A value of FSTRCMP_ERROR (always negative) indicates a \f[I]malloc\fP(3)
49 or \f[I]mbstowcs\fP(3) failure.
50 .SH SEE ALSO
51 .TP 8n
52 \f[I]fstrcmp\fP(3)
53 fuzzy comparison of two strings
54 .TP 8n
55 \f[I]fstrcolli\fP(3)
56 fuzzy comparison of two strings using the current locale
57 .TP 8n
58 \f[I]strcoll\fP(3)
59 compare two strings using the current locale
60 .TP 8n
61 \f[I]mbstowcs\fP(3)
62 convert a multibyte string to a wide-character string
63 .so man/man1/z_copyright.so