fstrcmpi(3)
π fstrcmpi β like, the fuzzy string comparison one π
okay bestie, so this is a page from the Library Functions Manual, and today we're learning about fstrcmpi(3). it's giving "are these two strings kinda the same" energy and honestly? obsessed. π¦
β¨ NAME β¨
fstrcmpi β fuzzy comparison of two strings πΈ
β¨ SYNOPSIS β¨
#include <fstrcmp.h>
#define FSTRCMPI_IDENTICAL
#define FSTRCMPI_THRESHOLD
#define FSTRCMPI_ERROR
int fstrcmpi(const char *string1, const char *string2);
β¨ DESCRIPTION β¨
so the fstrcmpi() function compares two strings, string1 and string2. that's it. that's the whole vibe. π
β¨ RETURN VALUE β¨
the fstrcmpi function hands back an int that's somewhere between 0 and FSTRCMPI_IDENTICAL. here's the tea:
0β the strings are utterly un-alike. like, not even a little. πFSTRCMPI_IDENTICALβ the strings are identical, periodt. π- more than
FSTRCMPI_THRESHOLDβ and btwFSTRCMPI_THRESHOLDlies somewhere between0andFSTRCMPI_IDENTICALβ would be considered "similar" by most people. π«Ά FSTRCMPI_ERRORβ which is always negative, btw β means amalloc(3)failure happened. π
no cap, that negative return is your signal that memory said "not today."
β¨ SEE ALSO β¨
fstrcasecmpi(3)β compare two strings ignoring case β¨fstrcmp(3)β fuzzy comparison of two strings πfmemcmp(3)β fuzzy comparison of two memory areas πstrcmp(3)β compare two strings β
β¨ COPYRIGHT β¨
this is fstrcmp version 0.7, and the copyright is Copyright (C) 2009 Peter Miller β you can reach him at Peter Miller <pmiller@opensource.org.au> π
and here's the lore, bestie: the comparison code is derived from the fuzzy comparison functions in GNU Gettext 0.17. and those GNU Gettext comparison functions were, in turn, derived from GNU Diff 2.7. it's giving generational talent. π§
also: Copyright (C) 1988-2009 Free Software Foundation
and that's the whole page, bestie π β the manual name is fstrcmpi, from the Library Functions Manual, and this little love letter of a page is fstrcmp version 0.7, dated Copyright (C) 2009 Peter Miller. slay, stay fuzzy, bye π
π¦ where this page comes from
- debian bookworm: libfstrcmp-dev 0.7.D001-3 Β· LGPL-3.0-or-later
- debian trixie: libfstrcmp-dev 0.7.D001-5 Β· GPL-3.0-or-later
- fedora 43: fstrcmp-devel 0.7.D001-26.fc43 Β· GPL-3.0-or-later
- fedora 43: fstrcmp-devel 0.7.D001-26.fc43 Β· GPL-3.0-or-later
- fedora 44: fstrcmp-devel 0.7.D001-27.fc44 Β· GPL-3.0-or-later
- fedora 44: fstrcmp-devel 0.7.D001-27.fc44 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- opensuse-leap 16.0: fstrcmp-devel 0.7.D001-bp160.1.12 Β· GPL-3.0-or-later
- ubuntu jammy: libfstrcmp-dev 0.7.D001-2 Β· LGPL-3.0-or-later
- ubuntu noble: libfstrcmp-dev 0.7.D001-3build1 Β· LGPL-3.0-or-later
- ubuntu questing: libfstrcmp-dev 0.7.D001-5
- ubuntu resolute: libfstrcmp-dev 0.7.D001-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: libfstrcmp-dev 0.7.D001-5build1 Β· GPL-3.0-or-later
- Copyright (C) 2009, 2011 Peter Miller
- Copyright (C) 2009 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms